• Resolved vwondra

    (@vwondra)


    My client has a form that includes this slider for someone to pick a dollar amount. That data is then passed over to Salesforce (via their API).

    However – Salesforce cannot accept any “currency” data that has a prefix (a $ sign), and it cannot have any comma’s in it (Ex. $100,000).

    How can we make the plugin drop the prefix and not include the commas when submitted?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kaisar Ahmmed

    (@kaisarahmmed)

    Hi @vwondra, You can use gravity form pre submission hook.

    Here is example.

    //form id 30
    add_action( 'gform_pre_submission_30', 'pre_submission_handler' );
    function pre_submission_handler( $form ) {
    
        //range field id 2, use input_2
        $_POST['input_2'] = floatval(preg_replace("/[^0-9.]/", '', rgpost( 'input_2' )));
    }    

    you can change code as your requirements.

    Thanks

    Thread Starter vwondra

    (@vwondra)

    Thank you! That worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to submit the entry as a raw number’ is closed to new replies.