Support » Plugins and Hacks » 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:

     * 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.php

    Can anyone help me out here please?
    Many thanks!!

Viewing 1 replies (of 1 total)
  • NB, I have just noticed the missing semi-colon on line 3 and fixed it but it makes no difference.

Viewing 1 replies (of 1 total)
  • The topic ‘Parse error in custom function for Gravity Forms’ is closed to new replies.