I have an annual leave form which has numerous types of leave to select with check boxes.
If the annual leave check box is marked then a message box will prompt the user if public holidays are to be included.
The user will populate the response field with the number of public holidays included in a leave period.
I would then like the user input (number of public holidays) from the response field to be placed in a separate text box on the form.
The message box and response box appears to be working as they should, but I cannot work out how to get the value from the response into the text box.
Can any one please provide assistance with modifying my script as follows:
if (Annual_Leave.rawValue == "1") then
if ($host.messageBox("Does your leave application include public holidays?","Public Holidays",2,2) == 4) then
Public_Holiday.value = $host.response("Enter the number of public holidays included in your leave period!","Number of Public Holidays")
else
""
endif
else
""
endif
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I have developed a form with javascript code,
Code goes here,
form1.#subform[0].Button1::click - (JavaScript, client)
if(TextField1.rawValue==1)
{
var p=xfa.host.messageBox("Does your leave application include public holidays?","Public Holidays",2,2);
if(p==4)
{
var q=xfa.host.response("Enter the number of public holidays included in your leave period!","Number of Public Holidays");
TextField2.rawValue=q;
}
}
Views
Replies
Total Likes
Hi,
I have developed a form with javascript code,
Code goes here,
form1.#subform[0].Button1::click - (JavaScript, client)
if(TextField1.rawValue==1)
{
var p=xfa.host.messageBox("Does your leave application include public holidays?","Public Holidays",2,2);
if(p==4)
{
var q=xfa.host.response("Enter the number of public holidays included in your leave period!","Number of Public Holidays");
TextField2.rawValue=q;
}
}
Views
Replies
Total Likes
Hello ,
I did some hit and trial to your issue and developed a simple form .I am here giving you the link .Have a look at it.
Thank you very much for your help, success at last.
I have revised my script and the value from the response dialog has been included in the text box field.
Revised script as follows:
if (Annual_Leave.rawValue == "1")
{
var p = xfa.host.messageBox("Does your leave application include public holidays?","Public Holidays",2,2);
if (p==4)
{
var q = xfa.host.response("Enter the number of public holidays included in your leave period!","Number of Public Holidays"); xfa.form.topmostSubform.Page1.Public_Holiday.rawValue = q;
}
}
Views
Replies
Total Likes
Thank you very much for your help, I appreciate the time you have taken.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies