Expand my Community achievements bar.

Disable Submit button in workspace

Avatar

Former Community Member

Hi all, I actually have two questions but the subject line one is the more pressing.

I have placed a submit button on my form so that i would be able to have a complete button in workspace. The thing is that i would like to place some validation on that button, but submit buttons do not allow scripting on the click event. Basically is there an event i can script against to prevent submission of the form? i was thinking the maybe the presubmit, but i couldn't find any info if that was possible.

The second question is that I tried using a process field custom object, i know i can script against the click event to prevent submission there. However, when the form is passed to the next user, the pdf is replaced with a jboss 404 page (i added a screenshot so that you'd get an idea)

I have a custom renderer that is a copy of the default renderer with a policy and reader extensions at the end, with the option to render the form only once.

6 Replies

Avatar

Level 10

One way is to make the submit button invisible and use another button to do the validation and call the invisible button on successful validation.

Avatar

Former Community Member

Yes, but when i render the form in workspace, the flash complete button is tied to the submit button. So when the user clicks that button, it would actually click the submit button rather than the proxy button that you suggested to do the validation. Unless i misunderstood your suggestion.

Avatar

Level 10

You can tweak the whole code of Submit button's click event as follows:

// check all your conditions e.g

if(txtUserName.rawValue==null || txtUserName.rawValue=="")

{

     xfa.host.messageBox("Please enter the User Name.");

}else

{

          // place all the pre-defined code here...

}

I have tried this in Workspace ES and it works... hope this will help you

Nith

Avatar

Former Community Member

Thanks for the response, but what I think you're talking about is the submit button in the process field. I usually do use that button and place my validation in there but in this case I'm using a regular button of type submit (because if the issue that I mentioned as the second problem in my post), which you'll notice has the click event disabled.

Avatar

Former Community Member

Bump. Can anyone help me with this? Its become important to switch to the process fields now, but for the reason I mentioned in my first post I'm still having problems.

Thanks

Billy

Avatar

Former Community Member

Has anyone ever seen the error before? The 404 page?