By dhruvahuja on
I have a Drupal installation ready with all the functionality I needed. Now, I want to make a new form which should actually just fill in other forms with some default and some custom values from itself. A single new form may even need to drive several other forms.
What is the best approach to this?
Comments
My suggestion is to save the
My suggestion is to save the first form to a table and retrieve those values for other form. You can set default values for static variable and default values can also be retrieved from the tables. you can even define a variable and save the values in variable table.
eg:
'#default_value' => variable_get('default_text_content', t(VALUE_DEFINED) ),
define('VALUE_DEFINED',"Default that you want to save in the variable table.");
// To save define() to variable table.
return system_settings_form($form);
Hope this will help
Cheers.
You may want to check out
You may want to check out the Form Defaults module.