Parse error in custom function for Gravity Forms
-
Hello,
PHP newbie here. Have tried to write a custom function for use with Gravity Forms. Have created a child them and that’s all good.
Purpose of function: to take a value from a date picker field and return what day of the week it is.
Have added this into functions.php and added to child theme:
<?php /** * Use Gravity Forms Conditional Logic with Dates */Returns day of week of selected date add_filter("gform_field_value_dayofweek", "liz_populate_dayofweek"); function liz_populate_dayofweek( $value ){ $timestamp = (strtotime($value)) $day = date('l', $timestamp); return $day; } ?>
Which gives the following error:
: syntax error, unexpected T_STRING in …line 4 of child theme functions.phpCan anyone help me out here please?
Many thanks!!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Parse error in custom function for Gravity Forms’ is closed to new replies.