Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2009 at 16:04 UTC
Updated:
1 Jan 2010 at 02:50 UTC
I'm kinda stumped on this, and hoping someone here could offer some insight. Hopefully its a simple question. I am using the ctools modal dialogs to generate some sub forms. The issue i can't get around is how do i send data to the form. In my case I want to auto populate some of the form fields based on criteria on the parent page. But i'm just not figuring this one out.
Thanks in advance
Comments
Comment #1
joshk commented$form_state + hook_form_alter() allows this. For instance, in your callback to generate your form you have something like:
In addition to adding more arguments and data in the form_state at that point, you can do something like this:
Which will allow you to pre-fill the values.
Comment #2
merlinofchaos commentedI think josh's answer sufficiently covers this!