Page 1 of 5

sendgrid adding input fields

Posted: Tue Aug 07, 2012 9:29 am
by Michael4771079

Hi,
I am trying to add fields to the sendgrid plugin, and receive the info that the end user inputs in the email, any pointers would be a great help


sendgrid adding input fields

Posted: Tue Aug 07, 2012 3:53 pm
by maxkatz

You can edit the plug-in services as any other service. What exactly did you try?


sendgrid adding input fields

Posted: Tue Aug 07, 2012 4:16 pm
by Michael4771079

Hi Max,
i need to add input fields for a few items that need to end up in the email message, for e.g. Name, Mobile, Time, Pickup Point, Destination etc, but in the mapping there is only one message parameter


sendgrid adding input fields

Posted: Tue Aug 07, 2012 4:23 pm
by maxkatz

You could store the data into local storage and then get them in the mapping JavaScript.


sendgrid adding input fields

Posted: Tue Aug 07, 2012 4:26 pm
by Michael4771079

do you mean map local storage to message, or do I need a string for each input to be added in the mapping for each item


sendgrid adding input fields

Posted: Tue Aug 07, 2012 4:50 pm
by maxkatz

I meant something like this:

var name = localStorage.getItem(''name");
var mobile = localStorage.getItem(''mobile");
var pickup = localStorage.getItem(''pickup");
...

return name + mobile + pickup;

and pass this to the service in mapping.


sendgrid adding input fields

Posted: Tue Aug 07, 2012 4:54 pm
by Michael4771079

cheers Max,
I'll try that


sendgrid adding input fields

Posted: Tue Aug 07, 2012 8:40 pm
by Michael4771079

Hi Max,
I set this up as suggested but i cannot get it to work, hers what I did

I set a new app with sendgrid plugin, I then place an input and called it ''name'', I then set local storage on click and added ''name'' to the parameters in sendgrid settings, and then added the string, email is sent but the name is not included in the email, I've done something silly. Hers the link
http://project.tiggzi.com/mobile-fram...


sendgrid adding input fields

Posted: Tue Aug 07, 2012 10:10 pm
by maxkatz

How do you save the "name" value into local storage?


sendgrid adding input fields

Posted: Tue Aug 07, 2012 10:33 pm
by Michael4771079

in events, ''click'', add action ''set local storage variable'' variable name ''name'' bind to component ticked, property name ''text''