Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

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

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

multivalue array with TextField


Reply

2 Posts   1003 Views

Avatar
ojalà

17 October 2008 at 11:36pm Community Member, 87 Posts

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"
         
          )
);

Avatar
Willr

19 October 2008 at 3:51pm Forum Moderator, 5511 Posts

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')
);