maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

sendgrid adding input fields

You need to read the mobile value from local storage here:

code
var name = localStorage.getItem("_name");
console.log (name + " " + value);
return name + " " + value;
/code

Also, when you set the local storage on button click, first set all values then invoke the service.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

sendgrid adding input fields

Thanks for that Max,

I now understand the method, however I can get one or the other i.e. name or mobile but not both, unsure how to adjust the code above to pull 2 inputs

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

sendgrid adding input fields

Thanks for that Max,

I now understand the method, however I can get one or the other i.e. name or mobile but not both, unsure how to adjust the code above to pull 2 inputs

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

sendgrid adding input fields

code
var name = localStorage.getItem("name");
var mobile = localStorage.getItem("mobile");

return name + " " + mobile + " " + value;
/code

If you map 1-1 a UI component to service input, then you can just map the values. Nothing else needs to be done.

If you map two or more UI components to a service input, then you need to do the following (as you can't yet map two UI properties to a single input parameter).

1) On button click, save both values into local storage.

2) For service input parameter, run the code that I provided above. If you have more input fields, simply add them the same way.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

sendgrid adding input fields

Cheers Max,
thats great, something for me over the weekend, have a good one yourself, thanks for all your help

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

sendgrid adding input fields

Hi Max,
detail above works very from browser preview in tiggzi but when I download and install the app on the phone it will only send the first email attempt, after that when you send the email you get the message "email sent" but no email arrives, the app is shared

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

sendgrid adding input fields

Add an error handler to the service and see if anything will be displayed.

http://help.tiggzi.com/documentation/...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

sendgrid adding input fields

Hi Max,
I need to read the datepicker and the select menu along with my other input fields, the java for the other inputs as you suggested but I did not get anywhere with those
two,
also what do I need to add to this script to make all these item list in the email rather than in one straight line

var name = localStorage.getItem("name");
var mobile = localStorage.getItem("mobile");
var pickupinput = localStorage.getItem("pickupinput");
var destinationinput = localStorage.getItem("destinationinput");

return name + " " + mobile + " " + pickupinput + " " + destinationinput + " " + value; components

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

sendgrid adding input fields

Use '\n' to add new lines.

I'm not sure I understand the first question.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

sendgrid adding input fields

Do you mean like this

var name = localStorage.getItem("name");'\n'
var mobile = localStorage.getItem("mobile");'\n'
var pickupinput = localStorage.getItem("pickupinput");'\n'
var destinationinput = localStorage.getItem("destinationinput");'\n'

return name + " " + mobile + " " + pickupinput + " " + destinationinput + " " + value;

Return to “Issues”