We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Support Find a Developer Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Support Find a Developer Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Email customer quote with FormGrab after curation by Shortlist.

Development and Programming

John Condy's avatar
John Condy
1 posts
one month ago
John Condy's avatar John Condy

{exp:shortlist:lists cache="no"} {exp:formgrab:form name="customer_quotes" title="Customer Quotes"} <input type=”text” id=”menber-name” name=”member-name” size=”40” maxlength=”35” placeholder=”Your Name”/>

  <input type="text" id="member-email" name="member-email" size="40" maxlength="35" placeholder="Your Email" />


  <textarea id="delivery" name="delivery" placeholder="Delivery Adress For Quote" rows="3"></textarea>

  {items}

   <input type=”text” name="product{entry_id}" id="product{entry_id}" value="{title}" placeholder="{title}">

                  <input  20px; margin-bottom: 25px;" type=”text” name="product_info{entry_id}" id="product_info{entry_id}" value="" placeholder="Information about your requirements. Qty, Dimensions,">   

  {/items}

 <input name="submit" type='submit' value='Submit Form' />

{/exp:formgrab:form} {/exp:shortlist:lists}

As you can see what I am doing is using the id of entry id to make sure that a new field is uniquely generated for each item that the user has selected within shortlist. This seems to be working and entries are showing in the backend formgrab correctly.

The question I have is can all this be sent using the Email body. An {email_all_fields} feature or something like that.

I have enabled email notification on formgrab and can generate an email with

{member-name} {member-email} {delivery}

all working perfectly.

The problem is generating the email for the items which the user selects.

It will work when for example I pick the item with id 141 if I have in the Email Body Section.

{Product141} {Product_info141}

The email will work perfectly but obviously I don’t know which of the items the user will pick.

I have tried to do this using freeform and the built in email function before trying FormGrab. Through my testing FormGrab seems to be the only one that works a bit.

Thanks in advance to anyone who can help.

       
Rob Allen's avatar
Rob Allen
2,915 posts
one month ago
Rob Allen's avatar Rob Allen

I don’t think Formgrab has a email_all_fields function.

My first thought would be to have the Shortlist fields in a separate form (to prevent Formgrab grabbing the data). What you’d then do is use some Javascript to write shortlist field info to a hidden Formgrab textarea field.

Another approach would be to use Channel Form and save submissions as entries, you’d use a Grid field for the “items” data.

Have you seen https://addons.reinos.nl/simple-cart ? It’s a basic shopping cart without the payment stage. That would allow you to collect items info as “products” - what you then do with the “cart” bit is find a way to email the items to wherever, or even save them as a channel entry. A bonus with this one is that you can calculate price totals!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Contact
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.