Parse Phone Number when phone number is entered or "000-000-0000" whenever "Not answered" is Selected

Hello Makers, I’ve a function statement that’s supposed to send the actually phone number to GHL whenever anybody enters their phone number or send “000-000-000” whenever it’s left as “Not answered”. Right now, we only get “000-000-0000” whenever anybody fills the form irrespective of whether they enter their phone number or select “Not Answered”. We want to be able to get their phone number if they fill in their phone number or “000-000-0000” if they select “Not answered”

Here’s the code: {{if(2.answer1 + “=”“Not answered”“”; “0000-000-0000”; ; 2.answer1)}}

…and I’ve attached a screenshot. Looking forward to your support.

Thanks

when comparing strings you dont need to “” inside the if function
also, i see that you inserted ; twice
{{if(2.answer1 = “Not answered”; “0000-000-0000”; 2.answer1)}}
if you got any questions do not hesitate

3 Likes