Jump to content

Problems with opening and closing fieldsets in Process Module


opalepatrick
 Share

Recommended Posts

I am working on my first Process Module. I am creating forms. Fairly straightforward. However, I really can't work out how to create multiple fieldsets?

 $fieldset = $this->modules->get('InputfieldFieldset');

    $fieldset->label = 'Customer Source';
      $field = $this->modules->get('InputfieldPage');
      $field->inputfield = 'InputfieldSelect';
      $field->findPagesSelector = 'parent_id=1449, include=hidden';
      $field->labelFieldName = 'yff-lead';
      $field->name = 'yfflead';
      $field->columnWidth = 16;
    $fieldset->add($field);

      $field = $this->modules->get('InputfieldPage');
      $field->inputfield = 'InputfieldSelect';
      $field->findPagesSelector = 'parent_id=1452, include=hidden';
      $field->labelFieldName = 'customer-type';
      $field->name = 'customertype';
      $field->columnWidth = 16;
    $fieldset->add($field);

	//Rinse and Repeat

	$fieldset->label = 'Contacts';
      $field = $this->modules->get('InputfieldPage');
      $field->inputfield = 'InputfieldSelect';
      $field->findPagesSelector = 'parent_id=1538, include=hidden';
      $field->labelFieldName = 'salutation';
      $field->name = 'salutation';
      $field->columnWidth = 16;
      $fieldset->add($field);

I can create the first fieldset (Customer Source) but then get into trouble as the second fieldset overwrites the first. I understand why, but trying to use the open and close fieldset routine has flummoxed me. Any help appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...