Jump to content

BenjaminKern

Member
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

BenjaminKern's Achievements

  1. Another thing to note in case others run into the same issue. It didn't seem to work with "Hidden" form block items (the input value was changing, but not being sent in the submission POST request payload), but I worked around that by using a text block item and then just manually hide it with jquery on page load.
  2. Awesome, thank you so much for the reply. Very interesting article, and yes that did seem to work for me! Obviously needed to adjust the type of the HTML element (depending on what form item you want to populated) but that worked for me. Thank you again!
  3. After further triaging, I concur with "form state only seems to register the value when it is typed manually". Even if I remove the required validation, the fields I want to populate with jQuery are being ignored in the POST submission request. I also tried to trigger change, focus, keydown events but nothing seemed to pickup the fact that the value had changed. Just local changes to the DOM it appears. I contacted customer support, but they basically said that platform updates are not guaranteed to continue working with custom code and recommended continuing the discussion here.
  4. I have a Form setup, where I have custom javascript in place to hide required form elements, and populate them with jquery. This used to work, but now when the form is submitted, its reporting back as "Field is required" since the user themselves didn't type in the form field. This had worked previously, but it seems like possibly Squarespace is using ReactJS that is preventing the value override from being recognized by the validating backend? Any help would be greatly appreciated. Only thought currently is to do the required field validation in custom js as well and mark the fields in the form as not required, thus bypassing whatever check is happening
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.