Hello,
I'm trying to add an 'end_publish' parameter to the 'Form Settings' tab of the Form Wizard. Therefore I added the following code on line 390 in form_wizard.php for the layout-part.
However, I can't find the part of the code which saves the parameter to the database again. Or does it save all the $HtmlHelper->input variables by default and did I make a syntax error?
Does something know where to find it the part which saves the inputs to the database (so I can add code to also save params['end_publish'] just like it already happends with params['tight_layout])?.
Thanks in advance!
Regards,
Tim
edit: Solved. The line was located in admin.chronoforms.php in line 762 and 773. Had to add the following code in my case on line 763 and 774:
I'm trying to add an 'end_publish' parameter to the 'Form Settings' tab of the Form Wizard. Therefore I added the following code on line 390 in form_wizard.php for the layout-part.
<?php echo $HtmlHelper->input('params[end_publish]', array('type' => 'date', 'label' => 'Stop Publishing Date', 'class' => 'medium_input', 'value' => $params->get('end_publish', ''), 'smalldesc' => 'Insert the date the form should stop publishing.')); ?>
However, I can't find the part of the code which saves the parameter to the database again. Or does it save all the $HtmlHelper->input variables by default and did I make a syntax error?
Does something know where to find it the part which saves the inputs to the database (so I can add code to also save params['end_publish'] just like it already happends with params['tight_layout])?.
Thanks in advance!
Regards,
Tim
edit: Solved. The line was located in admin.chronoforms.php in line 762 and 773. Had to add the following code in my case on line 763 and 774:
$form_params->set('end_publish', $_POST['params']['end_publish']);
Hi Tim,
Sorry, I haven't tried to hack that deep in the code code :-(
I'll try to re-write the Watchman plug-in later this week; that had the functionality to turn forms on and off at specific dates or times.
Bob
Sorry, I haven't tried to hack that deep in the code code :-(
I'll try to re-write the Watchman plug-in later this week; that had the functionality to turn forms on and off at specific dates or times.
Bob
Thanks for your reply.
That would work as well. Could you then maybe add the parameters of the Watchman to the 'Form Settings' tab of the Form Wizard if it's not too much effort?
That would work as well. Could you then maybe add the parameters of the Watchman to the 'Form Settings' tab of the Form Wizard if it's not too much effort?
This topic is locked and no more replies can be posted.