Author Topic: Forms Manager - regular expressions?  (Read 5672 times)

Offline RD

  • Newbie
  • *
  • Posts: 11
  • Karma: +3/-0
    • View Profile
    • Modish, crafted contemporary design
Forms Manager - regular expressions?
« on: February 14, 2020, 04:32:52 PM »
Hi all
I've created a simple product enquiry form, customers can complete if they want more info about a specific product.  It shows for each product (I've added it to the default product page) and they complete fields for their name, email address, product name and comment. 
Is there some clever way I can have the product name (or even the URL of the page they're on) submitted automatically when they submit the form please, so they don't have to type the name of the product and I can remove that field from the form?  I notice there's a "regular expression pattern" option for the field - what does that do - I can't see any info on that?

Appreciate any ideas,

Rich

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Forms Manager - regular expressions?
« Reply #1 on: February 17, 2020, 01:04:40 AM »
Hello.
You can add the hidden field (not visible to customer) and fill it with any value. When customer send the form you receive the hidden as well

Regular expression is something to validate the entered value and return an error if not valiated (email, phone... etc)

Offline RD

  • Newbie
  • *
  • Posts: 11
  • Karma: +3/-0
    • View Profile
    • Modish, crafted contemporary design
Re: Forms Manager - regular expressions?
« Reply #2 on: February 17, 2020, 06:48:01 PM »
Thanks Basara, I see what you mean about using a hidden field, but is there any way I can get it to automatically send the product name, SKU number, or URL address from the form, for the product they are viewing and commenting on? 
The same form is used by each product, so I was hoping there might be a way to have the form send that info when submitted - some kind of auto-magic code like "=product_name".  Thanks!

 

Powered by SMFPacks Social Login Mod