1

In another question I asked Is there a way to alter a node save confirmation form?. The recommendation was to use hook_form_alter to append a callback to the submit handler that would redirect to a new form where I could implement my confirmation logic.

I have experimented with this and come up short in a couple of areas. One is ensuring that callbacks from other modules are not affected. The other is getting data in the form and form_state arrays from the node edit form to the confirmation form where I can act on it. It seems that an alternate solution is to use multi-step techniques and 'rebuild' the node edit form like the preview action does.

How can I ensure that when I rebuild the form with some confirmation options that the other form elements are hidden? In other words I just want a clean form but still retain access to the form and form_state data. Is there a form property that does this?

2
  • Not quite clear what are you trying to do; why you just don't hide unnecessary form elements with $form['element']['#access'] = FALSE;? Oct 17, 2013 at 5:24
  • Well, I could use that or one of the other techniques. I also found this useful useful. But I thought maybe there was a way to know which elements can be hidden. Oct 17, 2013 at 5:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.