I'd like to use a custom URL popup to populate a second field in the component window in addition to the field that is being called by the custom URL.
Example: my form looks like this
Category(custom URL attached):
(TEXT BOX HERE)
Sub-Category:
(TEXT BOX HERE)
Some Other field:
(TEXT BOX HERE)
When a user clicks "category" and the custom URL window opens, I'll give them a chance to choose a drop down, then based on that drop down (using simple html/javascript) give an additional box for the subcategory (which will change based on the category value).
When the submit button is pressed I'd like to populate both Category and Subcategory from that original custom URL.
My current code looks like this:
function submitOutput(){
var category = $("#categorySelect").val();
var subCategory = $("#"+category+"SubCategory").val();
var output = category+"::"+subCategory;
var fields = window.dialogArguments.getFields();
if (fields && fields.length > 0) {
fields[0].setValues([output]);
}
//window.close();
}