SR3: Form OnSubmit Function
The form OnSubmit function is documented for SR1 (pg 206), but it is missing (and I can't get it to work) in SR3
31.8 OnSubmit and OnCancel Functions
You can specify a script function to be called when a form's OnSubmit or OnCancel event handler is used.
To do this:
1. In the Designer, use the Scripts dialog to create a script function.
2. Select the form to which you want to assign the script function.
3. From the form's Client Extensions field, start the Integration Wizard.
4. From the Form extensions category, select the Run a submit script or Run a cancel script item and
click the Next button.
5. Complete the required information for the OnSubmit or OnCancel function.
An OnSubmit function must return a Boolean value. If the script returns:
• False, the submit action fails.
• True, the submit action succeeds.
This enables a process designer to submit only forms that validate.
Comments
-
It definitely does work in 9.0.3. You must return "true" for the form to submit, "false" to prevent it.
I suspect there is something else in your code that has changed.
0 -
all I put in the OnSubmit was "return false"
0 -
What version are you referring to, BTW? I assumed 9.0.3, but this mentions the Integration Wizard from v7/ 6 / 5.
0 -
I am on 9.0.3, but I copied and pasted from the 9.0.1 designer doc
0 -
RKushner wrote:
I am on 9.0.3, but I copied and pasted from the 9.0.1 designer doc
Beauty!
I missed that in my documentation errata. There is no end of 'copy & paste' to filter through in the version 9 docs!
0 -
RKushner wrote:
all I put in the OnSubmit was "return false"
did you put the semi-colon too?
0 -
I am writing vbscript, but I guess I can try doing it with jscript...
0 -
I changed the script to jscript, and now the form doesn't open up. The little wheel just keeps going round and round.
Does all of the script in a process have to be the same kind? (Like all vb or all j)
0 -
AFAIK, you can have both.
Did you put the semi-colon in the JScript? We have lots of examples that actually work from the link below.
I agree the documentation has been scrubbed of these events. I assume because they were wrong, but somebody forgot to add the corrected text!
0 -
Should "return false" work in vbscript?
0 -
Dunno, never use it, sorry.
0 -
Is there a message function is jscript, like msgbox("message")?
0 -
alert("hello world");
0 -
Is there something wrong with this:
LName = getField("lname1","");
if (LName > " ")
return (true);
else
return (false);The form hangs.....
0 -
JScript is case sensitive. BTW, and the field names are too.
0 -
I don't get it. My fieldname is "lname1" all lower case. Is there something else that I got the wrong case? Do I need to use an attribute instead of the empty string?
0 -
I think it is GetField(), not getField()
[edited to correct case (and avoid future confusion)]
0 -
I don't get it. You typed GetField() twice!!!
Can you please give me even the shortest one line example of using getfield in jScript?
Thanx!!!
0 -
I think Jerome meant to post getField not GetField.
The Metastorm documentation is not great and uses various different cases of the spelling - some of which are correct and some not. p209 of the designer guide has examples but look at the code examples not the blurb that surrounds it - that will only confuse.
0 -
Based on the manual, I tried:
LName = getField("lname1","items");
But it didn't work. I also tried:
LName = getField("lname1","");
The manual isn't at all clear about how to use the "attribute" parameter! But I can't get it to work at all!!!!!
I also tried:
LName = GetField("lname1","items");
and:
LName = GetField("lname1","");
I can't even think of other ways to try it. I can't get anything to work!!!!!!
BTW, lname1 is my field name, all lower case.
0 -
Paul wrote:
I think Jerome meant to post getField not GetField.
The Metastorm documentation is not great and uses various different cases of the spelling - some of which are correct and some not. p209 of the designer guide has examples but look at the code examples not the blurb that surrounds it - that will only confuse.
Yes, I did
Thanks, Paul.
0 -
RKushner wrote:
Based on the manual, I tried:
LName = getField("lname1","items");
But it didn't work. I also tried:
LName = getField("lname1","");
The manual isn't at all clear about how to use the "attribute" parameter! But I can't get it to work at all!!!!!
I also tried:
LName = GetField("lname1","items");
and:
LName = GetField("lname1","");
I can't even think of other ways to try it. I can't get anything to work!!!!!!
BTW, lname1 is my field name, all lower case.
This last is the only actuall valid one.
I would try:
var LName = GetField("lname1","");
return true;
assuming the case of the field name is correct.
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories