Page 4 of 5

sendgrid adding input fields

Posted: Thu Aug 09, 2012 9:46 pm
by maxkatz

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.


sendgrid adding input fields

Posted: Fri Aug 10, 2012 10:43 am
by Michael4771079

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


sendgrid adding input fields

Posted: Fri Aug 10, 2012 5:00 pm
by Michael4771079

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


sendgrid adding input fields

Posted: Fri Aug 10, 2012 5:22 pm
by maxkatz

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.


sendgrid adding input fields

Posted: Fri Aug 10, 2012 5:29 pm
by Michael4771079

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


sendgrid adding input fields

Posted: Wed Aug 15, 2012 5:03 pm
by Michael4771079

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


sendgrid adding input fields

Posted: Wed Aug 15, 2012 7:22 pm
by maxkatz

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

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


sendgrid adding input fields

Posted: Thu Aug 23, 2012 6:40 pm
by Michael4771079

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


sendgrid adding input fields

Posted: Thu Aug 23, 2012 8:25 pm
by maxkatz

Use '\n' to add new lines.

I'm not sure I understand the first question.


sendgrid adding input fields

Posted: Thu Aug 23, 2012 8:35 pm
by Michael4771079

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;