Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Custom form field template

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 446 Views
  • Chimera
    Avatar
    Community Member
    10 Posts

    Custom form field template Link to this post

    Hi,

    i want to render form field with custom template like its described in documentation, but it doesent work.

    This is my field:
    $field = OptionsetField::create('filter_type', 'filter_type', array("" => "Prodej", "rent" => "Pronájem"));
    $field->setTemplate('PropertyOptionsetField');
    $field->setFieldHolderTemplate('PropertyOptionsetField');
    $fields->add($field);

    And templates are in this paths :
    \themes\simple\templates\Includes\filter\fields
    \mysite\templates\fields

    Any suggestions ? Thanks.

    446 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.