Jump to:

1970 Posts in 1275 Topics by 607 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: 847 Views
  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Fieldset and Link to this post

    Hi,

    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),
    ecc..

    Thank you

  • Willr
    Avatar
    Forum Moderator
    5462 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'))

    847 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.