Expand my Community achievements bar.

populating fields when one selection is made

Avatar

Former Community Member
I am designing an order form for my company using adobe designer. I have used the template for a purchase order. What I need my form to do is to allow a user to choose through buttons what product they would like. Once that button is selected I would like another field to generate to choose turn time. I don't have a clue at this point (and after reading numerous guides) as to what script I need to put in the click section. How do I string these together?

My first button would be bpo's. I have already included a subform which I would like to be invisible unless that is selected. I also have a button titled appraisals which would also generate a sub form for ordering. When I change the script do I input

Newdataset.purchaseorder.subform1.button4::click or do I use generic names? Basically I need to know what script needs to be inputed into the click or change area to populate the subform. I am so confused at this point. Can anyone help?
1 Reply

Avatar

Former Community Member
Hi,



looks like you need a bit of help...



When working with these examples, make sure that the lanugage is set to javascript.



Here are a couple coding examples that might help:



click event of a button:

a.) put some text into a field:



try {

mySubForm.myField.rawValue = "put this text into the field.";

} catch(e) {

app.alert("Error: " + e);

}



b.) hide/display a subform:



try {

if (mySubForm.presence == "hidden") {

mySubForm.presence = "visible";

} else {

mySubForm.presence = "hidden";

}

} catch(e) {

app.alert("Error: " + e);

}



What you need to do is start looking at the many examples posted on this forum.