Forums Forums Search & Filter Pro CF7 and S&F – form action

Viewing 10 posts - 1 through 10 (of 20 total)
  • Anonymous
    #217063

    I have added custom results to shortcode contact form 7 in a loop. As soon as have something filtered under the cf7 fields filling I get an error.

    In this case, form action=”” CF7 is filled with S&F data:

    form action="/?sfid=505&sf_action=get_data&sf_data=results&_sfm_car_type=comfort&_sfm_car_price=1200+10000#wpcf7-f280-o1"

    Any solution.
    Thanks

    Anonymous
    #217064
    This reply has been marked as private.
    Trevor
    #217072

    You appear to be trying to use the CF7 form to send data to our plugin for it to give results? Is that correct?

    Anonymous
    #217076

    I use CF7 under each result block. To send CF7 data to E-mail. I wrote the appropriate shortcode in results.php.

    It is necessary that CF7 data be sent to E-mail.

    Trevor
    #217079
    This reply has been marked as private.
    Anonymous
    #217102
    This reply has been marked as private.
    Ross Moderator
    #217453

    Hi Arthur

    It looks like contact form 7 inherits the vars from our searches, this is probably for compatibility with other plugins but in this case it seems to have an adverse effect.

    You can modify the CF7 action urls, and remove the vars you don’t want, like this:

    
    add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
    
    function wpcf7_custom_form_action_url($url){
    	$url = remove_query_arg( "_sfm_sortingtesting", $url );
    	$url = remove_query_arg( "_sfm_min_val", $url );
        return $url;
    }
    

    In this case, in my tests, I remove _sfm_sortingtesting and _sfm_min_val from the CF7 action URLs.

    Let me know how you get on.

    Thanks

    Anonymous
    #217758

    Hi, Ross!

    The form works correctly, but ajax does not work 🙁

    Thanks.

    Anonymous
    #217765

    This does not work because the S&F ajax plugin is used. Disabling ajax helped, but now only ajax CF7 works.

    Ross Moderator
    #217771

    Hi Arthur

    Considering contact form 7 has a form, and S&F has a form, I’m a little confused as to which forms you are referring to!

    Can you explain which form works and doesn’t work? And is this still referencing the homepage you linked before? 🙂

    Thanks

Viewing 10 posts - 1 through 10 (of 20 total)