on 09-16-2008 2:24 PM
Hi all,
i have the following problem:
I have a dropdown and a textfield in one interactive form. The text field is not a mandatory field.
The DD have the values: "1-Yes" and "2-No"
If the user select value "2-No" the text field must be changed to a mandatory field (object->type->user entered - Required).
I think I have to implement a javascript event in the lifecycle designer...
but I don't know how to do that.....
a piece of code would be great...
thanks to everybody ahead....
regards
Hi,
i solved the problem with this simple coding. It is important to use the LifeCycleDesigner 8.x.
exit()
function exit() {
if (this.rawValue == 'Yes') {
TextField2.presence = "invisible";
}else{
TextField2.presence = "visible";
}
}
Reema, thanks for answers....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this code in formCalc in the Exit event of the text field.
var v_txt = xfa.form.form1....textfield_name.rawValue
var v_dd = xfa.form.form1...dropdown_name.rawValue
if (v_dd == "YES" & v_txt == "") then
xfa.host.messageBox("Please Enter Textfield")
xfa.host.setFocus(this.somExpression)
endif
Regards,
Reema
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Markus,
The solution that I provided will not let the user click or tab out of the field without having the value entered.
Another thing that you may do is write the same code in the preSave and docClose events so that the message is displayed even before saving or closing the form.
Reema.
Hope this helps you. Pl post back or close the thread if your problem is solved.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.