Changing default messages
Filled In will output validation errors and other details using default HTML. Sometimes this may not be appropriate for your website. You can change it very easily and without modifying Filled In at all.
You can change the default messages by creating a directory called view/filled-in
inside your theme directory. Within this you can create the following files:
error_filters.php
– display filter errorserror_list.php
– display other errorshead.php
– HTML head code, for JavaScript and CSSsaved_uploads.php
– display a list of saved uploads
The existing default messages are located in filled-in/view/default
. Feel free to copy them to your theme directory and modify as necessary.
Developing a custom extension
Extensions live inside one of the filled-in/extension
sub-directories, depending on what type of extension it is. You can create your own:
- Create a file in the chosen extension directory (e.g.
filled-in/extension/filter/my_custom_filter.php
) - Create a new class that extends one of FI_Filter, FI_Pre, FI_Post, or FI_Results
- Fill in the required functions:
process
orfilter
name
show
You can also fill in these optional functions if you want configuration options:
is_editable
edit
save
- Register the new class with:
$this->register ('Your_Class_Name');
You can take a look at an existing extension to get a better idea of how it works.