New Landing How can we help? Cardinal Functions.php file

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Cardinal
  • #105066
    George
    Member
    Post count: 235

    Hello,

    I am trying to edit my functions.php file with the following code it relates to gravity forms:

    
    /* Chris Hajer Gravity Forms August 21, 2014 */
    add_action('gform_pre_submission_12', 'format_for_payment');
    function format_for_payment($form){
            $total = rgpost('input_19');
            $_POST['input_25'] = number_format(floatval(ereg_replace("[^-0-9\.]","", $total)), 2, '.', '');
    }
    

    However, when doing so, an error occurs. Please see attached screenshot.

    How can I edit the functions.php file with the above code to not cause this error?

    I look forward to your reply.

    Thank you.

    Attachments:
    You must be logged in to view attached files.
    #105244
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Don’t know exactly(position inside the file) where you add code.
    I added at the code at the bottom of your current functions.php and your website doesn’t display any error.

    Let us know if it’s ok.

    -Rui

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register