Results 1 to 4 of 4

Thread: Custom template for Form Fields

  1. #1
    User zlobec's Avatar
    Join Date
    02-14-14.
    Posts
    34

    Default Custom template for Form Fields

    Hi,

    having problems with the Contao 3.5.24. If I select the custom form template for a form field, I get strange behaviour.

    I have two themes running two webpage roots and the custom template form field always uses the alphabetically first template it finds in the theme template folders. I have separated the templates in two theme folders.

    form_templates.png

    It takes the "okna" template not the "vrata" template. I can't rename the template to anything else because I get an error that the template was not found. Only original name must be used... in this case form_textfield.html5. I found this behaviour only in form custom templates so far.

    Is this a bug, or a feature ?

    Any workaround?

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    484

    Default

    The only way Contao knows which theme you are running on your page is the layout you choose in your page. Make sure this layout is from your desired theme.

    If this did not work please update to 3.5.27 first. I slightly remember a ticket regarding this topic.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    User zlobec's Avatar
    Join Date
    02-14-14.
    Posts
    34

    Default

    Quote Originally Posted by Andreas View Post
    The only way Contao knows which theme you are running on your page is the layout you choose in your page. Make sure this layout is from your desired theme.
    This was the problem... I simply duplicated the page to the new theme and it was loading layout from the previous theme. It solved my problem. The rename of custom form_ template problem resolved now also. Thanks Andreas.

  4. #4
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    484

    Default

    You're welcome
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •