Using a form that rebuilds doesn't work in a modal. Problem seems that ctools_modal_form_wrapper() only checks if the form has been executed.

Attached patch checks the rebuild flag to. Also I took the liberty of removing the empty() call, as form_state_defaults() in drupal_build_form ensures that executed is always set.

CommentFileSizeAuthor
#3 1451638-3.patch510 bytesrjbrown99
ctools-modal-rebuild.patch589 bytesxen

Comments

merlinofchaos’s picture

Status: Needs review » Fixed

Committed, pushed.

Status: Fixed » Closed (fixed)

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

rjbrown99’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new510 bytes

This applies to 6.x as well, no? Here's a direct port of the above patch.

  • merlinofchaos committed 40cfa68 on 8.x-2.x
    Issue #1451638 by Xen: Ensure modal form works for rebuild.
    
    

  • merlinofchaos committed 40cfa68 on 8.x-3.x
    Issue #1451638 by Xen: Ensure modal form works for rebuild.
    
    
japerry’s picture

Issue summary: View changes
Status: Needs review » Fixed

Fixed in D6.

  • japerry committed 12e3d66 on 6.x-1.x authored by rjbrown99
    Issue #1451638 by Xen, rjbrown99: Rebuilding forms breaks in modal
    

Status: Fixed » Closed (fixed)

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

xen’s picture