Front-end submission form templating
The front-end F2C submission form with your custom fields can now be templated to give it the layout you want. Move the buttons, change the order of the Joomla required fields, add other code and many more options are now possible.
Template parameters
The template parameters used to 'parse' the variables in this F2C template also use Smarty template engine and are almost the same as the article template parameters (as usual remplace fieldname with your custom fieldname in capitals!).
{< FIELDNAME >} outputs the submission input field
{< FIELDNAME >_CAPTION} outputs the label of the field
The buttons are: {$F2C_BUTTON_SAVE} {$F2C_BUTTON_APPLY} {$F2C_BUTTON_CANCEL}
To get started quickly we recommend you use the build in copy feature and follow these steps. Also have a front-end menu link to the content type for which you want to template the submission form. This way you can test your changes.
Step 1: Copy the default template using build in function
It is possible to create a submisison form template from scratch but this isn't recommended since you'll need to add all the template parameters by hand. Making a copy of the template used by deafult by F2C is easiest. That's why we strongly recommend you copy the template when you have finished (and tested) your form!
To copy and activate your front-end submission form template go to the F2C Content Type manager and select (edit) the content type.
On the first tab with settings browse to the bottom untill you see the parameters for Form Template. Click on 'generate default form template'. Next use the 'select template' button to select the generated template. Last, set Use Form Template to YES and SAVE!
Step 2: Edit the template to your liking
Editing the generated default form template (location media/form2content/templates) is easiest done using FTP and a HTML editor. Change any layout, order of fields etc., save and see the effect on your website by going to the front-end F2C article manager. Please read the 501 error message below!!
You can add any html, php (using the Smarty tags {php} {/php}) or scripts in your template. At the moment we are not parsing Joomla plugins in the form. We will be looking at solutions to add tabs & slides etc. to the form without you have to script it yourself.
Step 3: Save and test and change and test ...
Enjoy!!
Error 501 'Show in front-end' fields are required in your template
If the F2C fields of your form have 'show in fornt-end' selected they have to be included in your front-end submission form template. If not you get the 501 Error.
The reason is security as this way no unwabted fields can be 'added'. If you don't want to show a field in your template simply set it to 'hide in front-end'.