| 1 |
<?php |
| 2 |
/* |
| 3 |
List of helpers for hooks fired prior to the form loading. |
| 4 |
*/ |
| 5 |
?> |
| 6 |
<li> |
| 7 |
<a class="helper" data-cf72post="add_filter( 'cf7sg_pre_cf7_field_html', 'filter_pre_html', 10, 2); |
| 8 |
function filter_pre_html($html, $cf7_key){ |
| 9 |
//the $html string to change |
| 10 |
//the $cf7_key is a unique string key to identify your form, which you can find in your form table i nthe dashboard. |
| 11 |
if('{$form_key}'==$cf7_key ){ |
| 12 |
$html = '<label></label>'; |
| 13 |
} |
| 14 |
return $html; |
| 15 |
}" href="javascript:void(0);"><?=__('Filter','cf7-grid-layout')?></a> <?=__('cf7 tag field pre-html.','cf7-grid-layout')?> |
| 16 |
</li> |
| 17 |
<li> |
| 18 |
<a class="helper" data-cf72post="add_filter( 'cf7sg_post_cf7_field_html', 'filter_post_html', 10, 2); |
| 19 |
function filter_post_html($html, $cf7_key){ |
| 20 |
//the $html string to change |
| 21 |
//the $cf7_key is a unique string key to identify your form, which you can find in your form table i nthe dashboard. |
| 22 |
if('{$form_key}'==$cf7_key ){ |
| 23 |
$html = ''; |
| 24 |
} |
| 25 |
return $html; |
| 26 |
}" href="javascript:void(0);"><?=__('Filter','cf7-grid-layout')?></a> <?=__('cf7 tag field post-html.','cf7-grid-layout')?> |
| 27 |
</li> |
| 28 |
<li> |
| 29 |
<a class="helper" data-cf72post="add_filter( 'cf7sg_required_cf7_field_html', 'filter_required_html', 10, 2); |
| 30 |
function filter_required_html($html, $cf7_key){ |
| 31 |
//the $html string to change |
| 32 |
//the $cf7_key is a unique string key to identify your form, which you can find in your form table i nthe dashboard. |
| 33 |
if('{$form_key}'==$cf7_key ){ |
| 34 |
$html = '<span>(required)</span>'; |
| 35 |
} |
| 36 |
return $html; |
| 37 |
}" href="javascript:void(0);"><?=__('Filter','cf7-grid-layout')?></a> <?=__('cf7 tag required-html.','cf7-grid-layout')?> |
| 38 |
</li> |
| 39 |
<li> |
| 40 |
<a class="helper" data-cf72post="add_filter( 'cf7_smart_grid_form_id','form_wrapper_id',10,2); |
| 41 |
function form_wrapper_id($css_id, $cf7_key){ |
| 42 |
// $css_id the css id for the html form wrapper. |
| 43 |
//$cf7_key unique form key to identify your form, $cf7_id is its post_id. |
| 44 |
if('{$form_key}'!==$cf7_key ){ |
| 45 |
$css_id = 'my-form'; |
| 46 |
} |
| 47 |
return $css_id; |
| 48 |
}" href="javascript:void(0);"><?=__('Filter','cf7-grid-layout')?></a> <?=__('the form wrapper css id.','cf7-grid-layout')?> |
| 49 |
</li> |
| 50 |
|