Jump to content

Recommended Posts

Posted

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.

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
×
×
  • Create New...