Aleš Sýkora wrote

Change GDPR field response data in Fluent Forms

15. 4. 2021 in

If you want to change the “Accepted” to something else, use the first snippet and change the $response variable.

//Change only GDPR response data
add_filter('fluentform_response_render_gdpr_agreement','gdprText',20,4);
function gdprText($response, $field, $form_id, $isLabel){
    if($form_id=36){
        $response = 'True';
        return $response;
    }
    return;
}

If you want to change the Terms and Condition and GDPR field response, use this code:

//Change both GDPR & Terms and Condition Response data 
$types = [
    'gdpr_agreement',
    'terms_and_condition',
];
foreach($types as $type){
    add_filter('fluentform_response_render_'.$type,'changeGdprText',20,4);
}
function changeGdprText($response, $field, $form_id, $isLabel){
    if($form_id=36){
        $response = 'True';
        return $response;
    }
    return;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More from category
Aleš Sýkora wrote
Display list of WooCommerce categories
19. 2. 2021 in
If you need to display list of all WooCommerce categories without products, you can use my code. It will display all categories with link to their archive page. It will also display category image, name of course and count of products inside the category. It is all wrapped in HTML with OxyNinja framework applied. So […]
Read More
Aleš Sýkora wrote
Woocommerce AJAX add to cart button in Oxygen repeater
5. 5. 2020 in ,
If you want to style custom repeater for woocommerec product categories in Oxygen builder and use the AJAX buttons in it feel free to use them with shortcode [add_to_cart id=""] or just copy the button html with class="add_to_cart_button ajax_add_to_cart"
Read More
Aleš Sýkora wrote
Auto-populate child content with parent content’s title
11. 7. 2019 in
Code snippet from our fan.
Read More
magnifiercross linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram