Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

How do I dynamically set a submit button target?

$
0
0

I want to programmatically set the submit button target instead of hard-coding it into the "Submit to URL" field.  This is what I tried:

1) created a separate text field, called submitToURLTxt, with data binding so that it can read the passed-in URL from an XML input file

2) created a submit button and added this code to the docReady event:

var url = submitToURLTxt.rawValue;

if (url == null || url.length == 0) {

   this.presence = "hidden";

}

else {

   this.resolveNode("#event").submit.target = url;

}

 

I also tried it in formcalc:

if (submitToURLTxt.isNull | submitToURLTxt == "") then

   submitButton.presence = "hidden";

else

  $.event__click.#submit.target = submitToURLTxt.rawValue;

endif

 

Neither way works. Help?


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>