Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    No, there are no filter for class. Instead, you can probably utilize wpcf7_form_tag filter you can find in the includes/shortcodes.php file for such purposes.

    Thread Starter meg@info

    (@megainfo)

    Thanks for purposes,

    by dumping the $tag array by this code :

    add_filter( 'wpcf7_form_tag', 'dump_wpcf7_form_tag_filter' );
    function dump_wpcf7_form_tag_filter( $tag ) {
      if ( ! is_array( $tag ) )
      return $tag;
      echo "<pre>";
      var_dump($tag);
       echo "</pre>";
      return $tag;
    }

    ( PS: if you test the code, the result are double, it like do_shortcode_tag() is executed two time ?)

    I was made many tests, and i see that the css class for all components is returned by wpcf7_form_controls_class.

    i suggest adding a filter in wpcf7_form_controls_class function, this will make adding css class more easy.

    Reagrds,

    so if i was to add code to functions.php for bootstrap 3. How would i go about it?
    Ex. adding class “checkbox” to <input type="checkbox">.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add CSS Class to fields’ is closed to new replies.