sisko
sisko

Reputation: 9910

Customize form to make it multipaged

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.

Upvotes: 1

Views: 1498

Answers (1)

Patrick Kenny
Patrick Kenny

Reputation: 6457

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.

Upvotes: 2

Related Questions