cancel
Showing results for 
Search instead for 
Did you mean: 

Form settings after pressing the submit button

Former Member
0 Kudos

Hello everybody,

I'm creating an adobe interactive form in the SAP-transaction SFP. I'm using this form in an offline scenario.

I have set some fields as mandatory, so they appear with a red frame as long as there is no input for these fields.

When i fill out the form, the red frames are gone - which is correct like that.

I also integrated an Email submit button. When i press this button, the form is being attached to a new mail. And when i open the attachement from the mail, the red frames appear again, although the form is filled with data.

How can i set the fields or the whole form inactive after pressing the submit button and after checking the form on input mistakes?

Any ideas?

Thank u very much, i really need some help with this.

Regards

Lennart

Edited by: Lennart Osthoff on Feb 28, 2012 1:44 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lennart,

Unfortunately, you need to set the fields to inactive via scripting. It's the "access" property which needs to be set to "readOnly". I'd use the preSubmit event. For a low number of fields you could set the property for each of them but if the number is high you could loop over the form elements and check if it is a field and then set the property.

Regards,

Juergen

Former Member
0 Kudos

Hello Juergen,

thank you very much for your support.

I tried to set one field (just to try it) in the pre submit event to "readOnly". But unfortunately it didn't work.

Additionally the rest of the coding of the pre submit button didn't work at all after inserting the "readOnly" setting on top.

I really don't know a solution for this problem.

Regards

Lennart

Former Member
0 Kudos

Hi Lennart,

Not sure what I was thinking yesterday. You need to introduce a state variable either in your data or as value of a hidden/invisible form field that tells you whether your form fields are active or not. In the initialize event you need to set the field access mode accordingly to your variable.

Instead of locking the form fields you need to change the state by updating the state variable. Modifying the access mode in the preSubmit event does not work because the form gets re-rendered when opened by the email recipient.

Cheers

Juergen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

You can make all the fields readOnly using javascript on click of your submit button.

Check the "Review Copy" element from the tab Webdynpro ActiveX from library. It will provide you the code to make all your fields in the form ReadOnly.

Regards,

Omkar Mirvankar.

Former Member
0 Kudos

Hello Omkar,

thank you for your help. I tried to use the "Review copy" element in my submit button (pre submit event, because on click doesn't exist). I'm not creating an interactive webdynpro form. I use my form in an offline scenario.

Despite this fact, can i use the webdynpro functionalities?

The way i tried it, did not work unfortunately.

Regards

Lennart

Former Member
0 Kudos

Hello,

The Click event will be available on the Email Submit button on the form.

Also if you are trying it on a single field please verify the path in dataview to reach the field before setting the readOnly property.

WD property cannot be used as everything is happening on the form in offline scenario.

Regards,

Omkar Mirvankar.

Former Member
0 Kudos

Hello,

strangely the click event does not exist! it appears in the event list but i cannot select it.

I tried it with the following coding example in the presubmit event of my submit button:

textfield1.mandatory = "disabled";

textfield1.access = "readOnly";

this is what i actually want to do for all the fields in my form.

When i fill out the form, the coding behind each field is perfectly fine. but when it comes to sending the form via email, the form in the attachment of the email shows all the mandatory fields again with a red frame.

and i don't know how to solve this.

Regards

Lennart

Former Member
0 Kudos

Any ideas please?

Former Member
0 Kudos

help please!