Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Fieldset and

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

Page: 1
Go to End
Author Topic: 888 Views
  • biapar
    Forum Moderator
    435 Posts

    Fieldset and Link to this post


    How can I use multilanguage feature like <% _t('Events.Upcoming_Events',"Upcoming Events") %> into TextField,HeaderField,ecc code?

    //Create Form
    $fields = new FieldSet(
    new FieldGroup (
    new HeaderField('Personal Information', 3),
    new TextField('FirstName', 'Nome / First Name', $member->FirstName),

    Thank you

  • Willr
    Forum Moderator
    5497 Posts

    Re: Fieldset and Link to this post

    You can use the same syntax that you use from templates - the _t function works in both.

    new TextField('FirstName', _t('MyForm.FIRSTNAME', 'First Name'))

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.