Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » multivalue array with TextField

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 994 Views
  • ojalà
    Avatar
    Community Member
    87 Posts

    multivalue array with TextField Link to this post

    I have this functione that show me form. I have need of 3 form, How can iterate TextForm value ($name, $title, $value)?

    function BrowserPollForm() {
    // Create fields
    $fields = new FieldSet(
          new TextField(
          
          $name = "name",
                $title = "numero di notti",
                $value = "1"
             
              )
    );

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: multivalue array with TextField Link to this post

    What are you trying to do? Get 3 text fields? You should just do

    $fields = new FieldSet(
    new TextField('Field1'),
    new TextField('Field2'),
    new TextField('Field3')
    );

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