• Ok so I did not get any help here πŸ™
    I had to do some developing work on the plugin, I suggest to embed in future releases (plug in version 1.7.9)

    I neede to create a search form, CSS customize it, validate the form fields inputs and display the search results on the same page.

    1. CSS customization – to enable to handle different parts of generate form a very simple identification should be added to the form creation loop:
    at – function search_custom_field_values: just ad to every <dl>,<dt>,<dd> id=”dd$index” also inside select and
    radio internal loops…this will enable CSS styling of forms.

    2. Form Validation – I use jQuery formvalidationengine, a very good validation tool. in order to validate fields you just need to add its js and css files and put class rules for each field in the form definitions.
    (class = validate[required] will make the field required).

    3. “In Page” search results – Currently the Query filter hooks are working as a search, altering main WP loop, redirecting to
    a loop display page. I suggest to add option to enable external code to hook to these filters (line 57 if ( isset($_REQUEST['cftsearch_submit']) && !$options['custom_field_template_external_loop'] )

    I used lyza_loop plugin to create the loops without affecting WP main loop.

    4. some bugs I found : you have and option to replace field key with label, but this should not prevent from using the
    label key for form fields label (line 3225 change to $output .= ‘<dt><label>’ . stripcslashes($val[‘label’]) . ‘</label></dt>’ .”\n”;)

    line 3272 add $selectLabel= $val[‘selectLabel’]; (left out – bug preventing select fields labeling)
    line 3299 add id to the search button (must for validation system compatibility )
    line 3431 change to $where .= ” AND ".$wpdb->posts.".post_status = ‘publish’ “; bug of multiple grouping causing error in sql.

    http://wordpress.org/extend/plugins/custom-field-template/

  • The topic ‘[Plugin: Custom Field Template] Search Form Improvements’ is closed to new replies.