You can easily customize the submit listing page on all our Directory themes. We have explained a few simple ways you can do this customization here:
Differentiate field on submission form
You can style a particular field differently by adding a CSS class for that particular field, here’s how you can do it.
Go to Custom fields settings from Tevolution -> Settings->Custom fields -> Add/Edit a custom field there you will find a field named CSS class under Miscellaneous Options, add this field specific CSS class name here e.g “myclass”.
Then you can style this particular field by writing CSS for this class under Appearance>> Custom CSS Editor.
.myclass{ border: red; font-size: 20px; }
There is a field named Extra Parameter too under Miscellaneous Options, you can use this field to pass an < input > tag for the field. e.g placeholder=”Business title”
For more details on html input tags please refer this w3schools tutorial.
Restrict Or Add new file extensions for Upload field (e.g. zip, pdf )
“tmpl_allowed_types” – this filter allows to pass the extensions for an upload type field.
Example:
add_filter('tmpl_allowed_types','tmpl_product_allowed_types',10,2); /* callback of upload type filter */ function tmpl_product_allowed_types($allowed_types,$htmlvar_name){ /* htmalvar_name will be the uniq name of the field of field type "Upload"*/ if($htmlvar_name == 'upload_image'){ return "zip,rar"; // change here e.g if want to allow jpg then add zip,rar,jpg }else{ return $allowed_types; } }
Organize similar fields in different groups on the submission page
On submission form you can create the group of similar fields with unique hooks. There are unique hooks before and after every field on the submission form
For example, There are 2 fields in submission form:
1. Start date
2. End date
For this type of structure you need to add “wrapper” before and after the field.
do_action('tmpl_custom_fields_'.$name.'_before');
The name will be the html variable name
1. Open the div before start date
add_action('tmpl_custom_fields_start_date_before','tmpl_custom_fields_start_date_before_callback') function tmpl_custom_fields_start_date_before_callback($allowed_types,$htmlvar_name){ echo “<div class=wrapper’’>”; }
2. Close the div at the end of the second field
add_action('tmpl_custom_fields_end_date_after','tmpl_custom_fields_end_date_after_callback’); function tmpl_custom_fields_end_date_after_callback($allowed_types,$htmlvar_name){ echo “”; }
You can make a group of fields by using hooks, you can also display a note or messages before or after the field with this kind of different hooks.
So, if you are a developer you can use these methods to customize the submit listing page on your Directory website quite easily.