• basquith16

    (@basquith16)


    Hello Everyone,

    The Context:
    I am using contactforms7 to pass data to firebase. It is working wonderfully except for numbers.

    Expected Behavior:
    When the data is passed to firebase, I expect it to be type number/integer

    Issue/Actual Behavior:
    If I create a number field:

    [number appSettings__customValue] or [number appSettings__customValue “0”]

    It writes into Firestore as a string, customValue: “0”

    Question
    Is this because the form’s number fields are not true numbers? Or is there an incompatibility of the forms writing numbers to firebase/firestore?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Every data submitted through a web form (not only about Contact Form 7) is a string, even if it comes through a number field and actually looks like a number. So, if you want to pass data as a number, you will need to explicitly cast the string to an integer.

Viewing 1 replies (of 1 total)
  • The topic ‘Numbers input passes value as a string’ is closed to new replies.