on 06-04-2008 10:05 AM
Hi,
Has any body worked on Form Scripting in Adobe.
My requirement is, after clicking on Submit, i need to check weather the user has filled the mandatory fields or not.For this Form scripting is necessary i feel.
Can anyone help on this issue.Helpful answer is highly rewarded.
I'm sure this question is not solved, right?
Well, have you guys tried the "Normal" button to achieve the submit functionality?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
My issue was not resolved using Webdynpro-Native Submit button.We cannot use Normal Submit button.
Thanks Arafat, for giving info regarding Scripting for Submit button.
But i feel its a complex one becuase here i have used Subform concept. I mean Purchase(Subform)>Data(Subform)>Row1(Subform)-->Comments
Edited by: Sankar Narayana on Jul 22, 2008 3:54 PM
Hi indra,
I'm facing the same problem and i think the only way to solved it is to set a "validation button" in the form as visible and the submit button as hidden .
then in the validation button add your script and if it's ok then set the event of submitbutton , that shoul'd work .
I'll test it and still look for another solution
Best regards
Hey Guys,
My problem is solved as of now. I kept validations at field level and if that misses i kept validation at server side (Webdynpro-Java) level, if that misses and atlast i kept validation at R/3 level. So mostly the user cannot make a mistake crossing these three levels.
I got the same idea what you said i.e hiding the buttons, but here the user should click on the button for two times.
But i still appreciate your suggestion. Thanks for helping.
Now I got another problem. Please check the post today and help me in that issue.
Hi Sankar,
I assume that you are having an Online scenario with a Interactive form UI element in the View. If you want to validate the data filled in the form, you can check the data first and then do the submit action after data is validated. You must have linked an action with the submit action of the IF UI element, In that action before calling the submit functionality you can validate the data that is binded with the context and raise error in case some error is there and these errors can be displayed in the view area.
Let me know if you have something specific.
Regards,
Arafat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sankar,
If you want to write script which should be triggerd on pre submit event, you can write it in Javascript or Formcalc like this:
Java Script:
if (Page.Subform.FieldName.rawValue == null)
{
xfa.host.messageBox("Please enter comments in the given box");
xfa.host.setFocus("Page.Subform.FieldName"); // This will return the cursor to the field.
}
Hope this helps!!
Regards,
Arafat
>
> Whatever u said was correct, so where do i need to write my code.Please specify.I mean in which function i need to write the code.
Hi Sankar
When you are working with interactive forms inside Web Dynpro, you can check mandatory fields either through Web Dynpro or through Interactive Forms. If you choose to let IF do the work you have to insert your script in the following place:
1. Open your interactive form template (e.g by clicking on <Corresponding-Web-Dynpro-View>Right Click on layout element Interactive Form->"edit" )
2. Select the field in the "Data View" which you wish to be mandatory
3. Go to the Selector "Show: Events with Scripts" in the menu panel and select "Show validate"
4. Insert the valdiation script, e.g. this.isNull || this.rawValue.length >= 0; etc.
You'll find more on scripting in the documents: Adobe_XML_Form_Object_Model_Reference.pdf or lc_designer_scripting_basics.pdf (google will help)
Kind regards
Bettina
Reward points if helpful
Hi,
I got a doubt where do i keep this code
xfa.host.messageBox("Please Enter comments");
Point1:
Is the above code necessary or how do i get the alert message
Point2:
To which field i need to keep the script
this.isNull || this.rawValue.length >= 0;
I have two fields (Comments-TextField & WDPNative Submit Button)
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.