1

A module I am using provides a single paged configuration form. But for my additional configuration purposes, I am attempting to make it multipaged with one additional page for collecting extra configuration data.

I am implementing hook_form_alter and I included the following code:

$form['next'] = array(
        '#type' => 'button',
        '#value' => t('next'),
        '#page callback' => array('custom_ucreate_profile2'),
        '#button_type' => 'button',
    );

I have also created the custom_ucreate_profile2 menu link. The configuration page at the end of that link works fine. But the problem is when I click on the "next" button, the current page just reloads and do not navigate to custom_ucreate_profile2.

halfer
  • 19,824
  • 17
  • 99
  • 186
sisko
  • 9,604
  • 20
  • 67
  • 139

1 Answers1

2

Instead of rolling your own solution, which can be hard to maintain as time goes on, you could try the field_group module. There's even a video showing how to use the multipage features.

Patrick Kenny
  • 4,515
  • 7
  • 47
  • 76