Jump to content

joshbespoke

Member
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

joshbespoke's Achievements

  1. Thanks @paul2009. I will look into this and give it a try. Would this in turn essentially negate the need for the code injection discussed above do you think? I havent used Zapier as yet so unsure as to its functionality. ___ FYI, and future thread readers. Overnight, I did find the alternate code to change the 'timecode' portion from the random generated number to now display the literal date and time to the second of the form submission. (if it was to be a preference of anyone). (Please note I am in Australia so the code is written to display DD/MM/YYYY, a simple change of the ('en-AU' to display ('en-US' should alter this for you if required). This is the new code including the input noted by @creedon as I required this for the function to begin working. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ var timecode = new Date().toLocaleString('en-AU', { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit' }); var subjecttxt = "#" + timecode; $('form').find("input[type=text], text").each(function() { if(!$(this).val()) { $(this).attr("value", subjecttxt); $(this).attr("readonly", true); $(this).css("display","none"); var val = subjecttxt; return ( val !== subjecttxt ); } }); }); $(document).ready(function(){ $('form').find("label[class=title]").each(function() { if(!$(this).val()) { $(this).css("display","none"); var val2 = "none"; return ( val2 !== "none" ); } }); }); </script>
  2. This was so helpful and I have been able to get this to work. Thanks @Ian_A. I do have a further quiry for you. As I typically reply to the client via the form generated email, I wonder if there may be an alternative code that produces the literal time stamp down to the second essentially. e.g 21 Jan 2023-14:02:39... Or possibly code that automatically copies the 'Name' input entertered by the client and populates the hidden subject with this information. This would result I feel in a cleaner subject line to reply to the client with and retain the 'conversation grouping' Gmail produces. (I have noticed that if I simply edit the subject line during reply to remove the unique number, it drops from the grouping. Hopefully this all makes sense. Ultimately it would be I feel a very popular inclusion if @Squarespace developed and option where it simply adds the Form submission number. i.e your first form submission subject would include Contact Us Form Submission - #0001, your 301st would be Cuntact Us Form Submission - #0301 etc etc
×
×
  • 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.