cancel
Showing results for 
Search instead for 
Did you mean: 

Ensuring that required fields are filled before submitting the form

Former Member
0 Kudos

Hi,

In my PCR, I have a number of fields which are of type <b>"User Entered - Required".</b> The reason why this was chosen is because the user is required to fill all these mandatory fields before submitting the form. I've included error messages within the <b>Empty Message</b> field under the Value tab of each of these fields. However, if the fields are left blank, the message does get displayed, but it still allows the user to submit the PCR.

My question is, how can I ensure that the PCR does not get submitted until all mandatory fields are filled?

Thanks and regards,

Adeline.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Within the SCENARIO_PROCESS_USER_COMMAND method, a check was done on all mandatory fields. If any of the fields were not filled, then a custom error message would be prompted, and this would not allow the user to proceed to the next stage.

Former Member
0 Kudos

I have found a work Around for the same.

In the Event PRESAVE, You can Populate a Custom Dialogue Box.

If the User Clicks OK then he have to Fill the Mandatory Field and Save Again.

If the User Click CANCEL, a Blank copy of the Form would be Saved.

-


PRE SAVE EVENT----


var oDlg =

,

,

,

,

]

}

};

// Dialog Activation

if ("cancel" == app.execDialog(oDlg))

{

xfa.host.resetData();

}

Former Member
0 Kudos

Hi ,

You can attain this functionality by writing script for nullity check on button click event (Submit Button ).

Regards,

Nanda Kishore Reddy . N

Former Member
0 Kudos

Hi,

The Review and Submit button are not custom buttons created within my PCR. This the "To Review Form" and "Submit" buttons which are standard functionality that is used to submit the form and subsequently, trigger the workflow.

Should I be checking the scripts of the fields which are the mandatory fields?

Thanks and regards,

Adeline.

Former Member
0 Kudos

Hi,

Is there anyone out there who can help me with this? I hope to be able to get some answers soon as this is quite urgent. Thanks for your help!

Regards,

Adeline.

Former Member
0 Kudos

Hi,

I've still not got any solution for this problem. So here's my question again :

In my PCR, I have a number of fields which are of type "<b>User Entered - Required</b>". The reason why this was chosen is because the user is required to fill all these mandatory fields before submitting the form. I've included error messages within the Empty Message field under the Value tab of each of these fields. However, if the fields are left blank, the message will get displayed, but it still allows the user to submit the PCR.

My question is, how can I ensure that the PCR does not get submitted until all mandatory (required) fields are filled?

Is there anything that controls this within the QISR BADI?

Thanks and regards,

Adeline.

Former Member
0 Kudos

Hi ,

Standard buttons mean you dont have access to any of the events of the button component ?

Nanda

Former Member
0 Kudos

Hope he has got the solution already. But still -

What i do is - the Event getting triggered on clicking the review button is 'CHECK'.

At the User command method of the check event in the QISR1 BAdi, check mandatory fields. If not filled, raise an error message using the return parameter.

If there is any other solution. do post. [:)].

Thanks and Best Regards,

Anto.

Former Member
0 Kudos

Hi,

Yes I did get the solution. Sorry for not posting this much earlier as I was really busy the past week.

My solution was similar to that suggested by Anto. Within the SCENARIO_PROCESS_USER_COMMAND method, I checked to see whether there was any values filled into the mandatory fields. If not, custom error messages were displayed.

Hope this will help those who face the same problem

Thanks and regards,

Adeline.

Former Member
0 Kudos

Hi Adeline!

that sound strange because I use this function and it works. If I choose <b>User Entered - Required</b> without a message, the Adobe Reader marks the required fields in red and gives a generated message.

If I fill in my own message, it appears if I leave the field by pressing tab or activating another field.

So my form can't be submitted without entering all the stuff.

Try to test if the custom message appears and if you checked the following option:

Strg + K (Preferences or basic settings) -> Forms -> [ ] documentstatusbar deactivated (or something like this)

This should not be checked, so that you see the bar in top of your form. Then you can check the option <b>Mark required fields</b>.

Good Luck!

Philip

Former Member
0 Kudos

Hi Philip,

Yes, when I view the PCR in EP, I can see the 2 checkbox options which allow me to :

- Highlight fields

- Highlight required fields

When I select these checkboxes, they do highlight the necessary fields, but this still does not stop the user from submitting the form without filling out the fields.

My custom message does get displayed if I do not enter any value in the required fields, but the user is still able to submit the form. Is there anything else that I should check?

Thanks and regards,

Adeline.

Former Member
0 Kudos

Hi,

Is there anyone out there who has faced a similar problem like mine? I would appreciate any feedback on the steps taken to resolve the issue.

Thanks and regards,

Adeline.

Former Member
0 Kudos

That's crazy... which Submit-Button do you use?

Maybe this is the problem, but that would make no sense...

Former Member
0 Kudos

Hi Philip,

There's a button below the form, which firstly says "Review", and after I click on that, it changes to "Submit". For both cases, the custom message gets displayed but it still allows me to proceed. Would you be able to help further?

Thanks and regards,

Adeline.

Former Member
0 Kudos

Can you post the script code you apply on your button? With the caption change?