Hi,

I added the following code into mforms_example/mforms/mforms_example.session_store_example.inc:

function _mforms_example_step1_validate($form, &$form_state) {
  if (!$form_state['values']['www']) {
    // form_set_error wont prevent the step 1 form going to the step 2 form.
    form_set_error('www', t('Website is missing...'));

    // Just to make sure this portion of code was reached when the ajax callback ran, I also added a drupal_set_message.
    drupal_set_message('Yes, this portion of the code has been visited, so the validation callback is being called properly.');
  }
}

So, in my mind the step 1 form at YOURDOMAIN/mforms/example/session should persist when the "Continue" button is hit and "Your web site" field is left empty. That doesn't happen, the step 2 form gets loaded instead.

Is it a bug or am I missing something?

Comments

blueminds’s picture

Category: support » bug
Status: Active » Fixed

Hi FranciscoLuz,

I suppose you used MformsMultiStepControls as form controls. If that is the case limit_validation_errors has been implied on continue button, which prevented the validation. The problem is now fixed, the new release including the fix will be out soon.

Thanks for your feedback.

FranciscoLuz’s picture

Hi,

I just read the doc at http://api.drupal.org/api/drupal/includes%21form.inc/function/form_set_e... after looking into your latest commit and now I see why it wasn't working.

Thank you,

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

minor grammar correction.