[Plugin: Fast Secure Contact Form] [Bug fix suggestion] CSS styles cannot be empty
-
Hi Mike,
Thanks again for your excellent plugin.
As I prefer to use an external style sheet to style the forms/have clean HTML, I’ve tried to empty a number of the css style fields in the form setup. However when I save the form, the default/original css is back. Similar with the field sizes which I would prefer to set via CSS rather than with a field size attribute.
In my opinion this is undesirable behaviour/a bug.
I realise that I can add a class instead of styling and that this would overcome this behaviour, but most of the time adding a class isn’t necessary as implementing smart css rules eliminates the need for all those extra classes.
I’m using version 3.1.5.3 of the plugin – the latest & greatest ??
To change the above described behaviour, the following things would need to be changed as far as I can see:
In the admin/si-contact-form-admin.php file, line 247 to 262 – empties would need to be allowed. Similar for the field size options.
In the si-contact-form.php file, line 2333 – the si_contact_convert_css($string) function would need to check for an empty input and if so, return an empty string. Sample code:function si_contact_convert_css($string='') { if( $string === '' ) { return } ....
In the si-contact-form-display.php file and the si-contact-form-ex-fields.php file, everywhere where there’s code similar to
size="'.$ctf_field_size.'"
this would need to be changed to something along the lines of:( isset( $ctf_field_size ) ? ' size=" ' . $ctf_field_size . '"' : '' )
No doubt I’m still missing something, but I’ve tried to cover most. If you like I could provide you with a patch.
I hope this helps and feel free to contact me if you have any questions about this including if you would completely disagree with me ;-).
Smile,
Juliette
- The topic ‘[Plugin: Fast Secure Contact Form] [Bug fix suggestion] CSS styles cannot be empty’ is closed to new replies.