Forms - inserting elements from javascript

Vote:
 

Hi,

I'm trying to insert a couple of extra element fields for certain forms via javascript but they don't get picked upp by the HttpRequestContext.Form (or in the SubmissionData) in the PostSubmissionActor that I've created. I'm guessing the Forms compares the "outgoing fields" (put in by the editors) with the "incoming ones" and removes any unrecognized ones.

If this is the case, is there any way to turn this off?

Thanks!

#162240
Oct 13, 2016 16:52
Vote:
 

Hi,

You cannot get the extra fields value from SubmissionData in PostSubmitionActor, because the SubmissionData only contains values elements which are contained in FormContainerBlock. If you want to have your extra fields send with your form, you have to add a css class "Form__CustomElement" to your fields. Then on server you access them from raw submit data Request.Form.

#162842
Edited, Oct 18, 2016 5:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.