Error Field GDPR
-
Hi there,
I put a checkbox for GDPR compliance in my form.
When I submit the url in w3c validator service I have this error:
“Element p not allowed as child of element label in this context”I checked the file: wp-content/plugins/caldera-forms/fields/gdpr
And I found this:<label for=”<?php echo esc_attr( $field_id); ?>”
class=”caldera-forms-gdpr-field-label”
style=”display:inline; margin-left: 0.5rem;”
>
<?php
if( ! array_key_exists( ‘hide_label’, $field ) ){
echo esc_html($field[‘label’]);
}
?>
<p
class=”caldera-forms-consent-field-agreement”
>
<?php echo esc_textarea( $field[‘config’][‘agreement’] ); ?>
</p>I tried by changing <p> with <div> but it’s the same error.
What can I do to avoid this w3c error?
Thanks for your answer,
- The topic ‘Error Field GDPR’ is closed to new replies.