Discussions

 View Only
  • 1.  Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 03-18-2019 21:30
    I have a heavily modified version of the QB Wizard submission form I've been using for years. Spammers are now pinging our website every day, so I thought I'd simply turn on a field as required to slow them down, as I could see they weren't filling out ALL the fields.

    So I turned on the phone number field as required. And I still get submissions with blank phone number field. My understanding from QB help, if the phone number doesn't validate, it errors out too. I'm guessing the spammers are submitting text in the field, and QB renders it as blank.

    Most of the spammers successful submissions that do have 'phone numbers' are just a couple digits.

    I was looking at setting up a more elaborate 'honeypot' field that is straightforward required text, but seeing these get thru made me wary of putting in the effort.

    Here's my form header, for what it's worth. What do you think?


    <form name=qdbform method=POST onsubmit='return validateForm(this)' encType='multipart/form-data' action=https://xxx.quickbase.com/db/my-db-table?act=API_AddRecord&apptoken=my-not-so-hidden-token>">https://espec.quickbase.com/db/bh37ygkes?act=API_AddRecord&apptoken=cwfcy7gdzqrsyncqbi2bn4u4kr>">https://xxx.quickbase.com/db/my-db-table?act=API_AddRecord&apptoken=my-not-so-hidden-token>



  • 2.  RE: Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 03-18-2019 22:52
    The March release introduces Data Validation.  That means you can define any crazy rule hat you can write in any simple or complex formula to validate the data.  No validation = no save for you

    So you could validate that the phone number is all numeric


  • 3.  RE: Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 03-19-2019 01:37
    Wow, that's a feature I might have otherwise overlooked. Thanks for the heads up. Bye bye spammers!


  • 4.  RE: Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 03-26-2019 12:35
    Proud to report Day 1 with a "Custom Data Rule" the spam is blocked. Zero. Legit inquiries coming right thru. Woot! Thanks for he heads up on this new feature.


  • 5.  RE: Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 03-26-2019 12:42
    Good to hear. I also got to test on a real app yesterday to see how it behaves in grid end.  If any records are invalid, it will block the save of all records and highlight in red the offending record(s).  


  • 6.  RE: Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 03-26-2019 12:46
    I look forward to how I can use this tool to replace some form rules, one of the reasons I keep my users from using grid-edit.


  • 7.  RE: Can API_AddRecord complete if required field is blank? Help says no, my table says YES

    Posted 02-16-2024 13:46

    Five years later I search for help, and come back to the same thread for the same problem. Totally forgot about 'Custom Data Rules'. Set it and forget it, I guess. 



    ------------------------------
    David Jung
    ------------------------------