Right now, after a successful form submission, Drupal always does either a redirect (most common) or rebuilds the form (if #redirect is set to FALSE). For Ajax form submission, this is not enough choices. There needs to be someway to override this behavior. I am proposing the addition of a hook before the drupal_form_redirect in drupal_form_process.
This hook used to be part of #193311: Ajax Popups in Drupal 7: Adding Modal Dialogs to Help, Confirmations and Filter tips (Unified) and, along with a drupal_goto patch soon to be submitted, forms a basis of adding more power to #374646: Popbox (Popups Lite): Adding Modal Dialogs to Confirmations.

CommentFileSizeAuthor
process_form_redirect.patch915 bytesstarbow

Comments

Frando’s picture

In which way does this relate to #322344: (notice) Form improvements from Views? There, we add a 'rerender' property to $form_state that can be set to FALSE to suppress rerendering the form. I think #322344: (notice) Form improvements from Views is mostly ready to go, likely just needs a reroll and doc improvements.

starbow’s picture

@Frando, thanks for the pointer. I didn't know about that issue, and will go check it out.

starbow’s picture

Status: Needs review » Postponed

Ok, this idea could be implemented much more cleanly if #322344: (notice) Form improvements from Views gets in.

pasqualle’s picture

Status: Postponed » Closed (won't fix)

as I see with the form improvements this change is not needed any more