Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2010 at 21:04 UTC
Updated:
17 Feb 2011 at 22:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
tizzo commentedThis patch should apply to both the 6.x version and HEAD.
Comment #2
kleinmp commentedI've tested out this patch with an 'Add Another' button on a multipage ctools form, and it's working well. The extra documentation makes things much easier, so that one doesn't have to delve too deeply into the code in order to figure out what values need to be passed in the form state.
Thumps up!
Comment #3
afreeman commented+1 I've run into problems with this myself, thanks for posting a patch!
Comment #4
merlinofchaos commentedI missed this since it was posted against 7.x
Comment #5
merlinofchaos commentedI don't think on the rebuild we should be fetching the form build id out of $_POST. (IN fact, there's a couple of existing references to $_POST that I'm dubious about as well). We probably shouldn't be fetching from $_POST directly but from $form_state['input'].
But also, if there is a build ID, at this point, it should already be set in $form_build_id -- and we should use that, shouldn't we?
It's not clear to me why the form_build_id is being added to this call. It's not there in core. Can you explain to me why we need it?
Comment #6
merlinofchaos commentedComment #7
tizzo commentedOoooooh... Ok, so sorry about messing up the version number.
Actually in the event of an ahah callback $form_build_id never gets set, so that's why I was pulling it directly from $_POST. I moved that up above where it was already used cleaning that up just a bit. I think that might be the only place we can reliably find form_build_id in an ahah callback at that stage.
Rerolled patch attached.
Comment #8
merlinofchaos commentedCommitted, with a slight change to eliminate references to $_POST which are actually wrong anyhow.
Comment #10
memyselfandm commented@tizzo @merlin, can one of you expand upon this particular section:
I'm having trouble using this code, and I've created a separate issue with the specifics here: #1065172: '#ahah' not working in Panels content type settings modal
Thanks a lot,
M.