Hi
In the below image im getting value in ctx variable like cust id email mobile and response
so i need to populate the value in input text field of first name email mobile response
I was tried this approach but got an error as ctx is not defined
Here im passing the ctx variable value to temp email ,mobile and response.
var email = (ctx.vars.email).toString();
var mobile = (ctx.vars.mobile).toString();
var response = (ctx.vars.response).toString();
Here im passing email value to id of the text input field
document.getElementById('email').value =email;
document.getElementById('ph').value = mobile;
document.getElementById('response').value = response;
Does Anyone have idea on this
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @vani97,
If you want to carry these values from one page to another, e.g. for data capturing, etc., then you need to use document.controller to transfer the values.
So in the script on the page where these values are being entered by the user, you need to use
document.controller.setValue('/ctx/vars/email', email);
where email is the value entered in the form.
BR,
Ishan
Hi @vani97,
If you want to carry these values from one page to another, e.g. for data capturing, etc., then you need to use document.controller to transfer the values.
So in the script on the page where these values are being entered by the user, you need to use
document.controller.setValue('/ctx/vars/email', email);
where email is the value entered in the form.
BR,
Ishan