Change GDPR field response data in Fluent Forms

Author: Aleš Sýkora, 15. 4. 2021

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;
}