Hi,
Just a place to post code tweaks that might be useful in a future release.
[list=a]Showing the form name in the Form Wizard
I often have a long list of forms that I'm working with and it would be good to be able to see the name of the current form in the Wizard Edit.
Fix is to add something like this line at line 46 of views/form_wizard.php and line 42 of views/edit.php
Just a place to post code tweaks that might be useful in a future release.
[list=a]Showing the form name in the Form Wizard
I often have a long list of forms that I'm working with and it would be good to be able to see the name of the current form in the Wizard Edit.
Fix is to add something like this line at line 46 of views/form_wizard.php and line 42 of views/edit.php
<h2 style='margin: 3px 0;'><?php if( !empty($form) ){ echo $form->name; } else { echo 'New form'; } ?></h2>
[/list:o]
Nice one, thanks Bob!🙂
Regards,
Max
Regards,
Max
Hi,
Currently if you have file uploads in your form you either have to set the Method to File in the Form Editor, or add the enctype in the Form Tag attachment box. Here is a tweak to cfaction_show_html to check the form HTML and add the tag if the Form Method isn't set.
Bob
Currently if you have file uploads in your form you either have to set the Method to File in the Form Editor, or add the enctype in the Form Tag attachment box. Here is a tweak to cfaction_show_html to check the form HTML and add the tag if the Form Method isn't set.
$method = $form->form_params->get('form_method', 'post');
if ( $method == 'file' ) {
$method = 'post';
$enctype = 'enctype="multipart/form-data"';
}
// insert the next three lines
if ( !$enctype && preg_match("#type=['\"]file['\"]#", $form->form_details->content) ) {
$enctype = 'enctype="multipart/form-data"';
}
// end tweak
//add the form method
$form_tag_array[] = 'method="'.$method.'"';
Bob
This topic is locked and no more replies can be posted.