1 person found this helpful
There is no API exposed at that level but you will be passing an XDP file that represents the template (in XML format) to the Forms Server. You can manipulate the xml file to achieve what you want.
Just to note that the normal approach is to write script in the template but set it to run server side that way no script is running on the client as per your request. Note that if yo decide to go this way that only a subset of events will fire on the server.
I have one question, if the scripts are selected to run at Server side, how the event based(Like onclick) scripts behave.
If I have to hide the a button from a user, on what event should I write script?
If you set up your form server call correctly all submit buttons on the form will be overridden with a submitURL. You would need to create a Servlet to recieve these calls and then in turn make a call to the HTTProcessRequest Method. This call is well documented in the Forms API and will deal with the server side code.
Basically when you set a buttons code to runn server side a round tri[ to the server is performed.