0

I have built a Multi-Step form using forms example module as a base:

https://api.drupal.org/api/examples/form_example!form_example_wizard.inc/function/form_example_wizard/7

I have a function that takes the user-inputted location on the first form and returns data for presentation on the 2nd form. If no data if returned back from the first form I want to hide the Next button. How can I do this?

0

You could try something like this on the second form:

if (empty($form_state['values']['location']) {
    $form['next']['#access'] = FALSE
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.