on 2020 Sep 08 9:34 AM
Hello Experts,
I am working on lite-registration screen set.
We have populated email field of SAP CDC screen-set using js script at web page.
email is taken from URL of web page.
This logic, renders that email field of SAP CDC form is pre-populated as expected.
Email Field is read only.
Problem is when I submit the form, "formData" object doesn't collect email field value and system throws "missing required parameter " error(400002) for email field.
Please suggest if there is any best practice for pre-populating the data for lite user which holds his/her own data in URL or Body of https request
e.g. https://www.foo.com/lite?email=abc123@foo.com
Thanks,
Rohit
Request clarification before answering.
kobico , Thanks for sharing.
we have already tried the approach but it seems workaround.
we also got the reason for issue. Its "read only" property set from UI builder restrict the submission of data. causing missing parameter error.
I don't have any idea if this bug or any thing else but when you check "read only" for any field, SAP CDC renders that input as "disabled" on form.
"read only" & "disabled" both attributes are responsible for restricting user from changing the input. but "disabled" attribute restricts the submission of data as well.
Please refere my next question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually adding fields to onSubmit event (not onBeforeSubmit, my mistake) is not a workaround but the intended design for such use cases.
I do understand that in your use case you'd like to also *prepopulate* a field that doesn't exist on the user account data, this is not supported; so, your workaround that sets the input value directly seems inevitable.
So, for your use case, I think that it's OK to use both: setting it directly to the DOM and add it in the event to the form data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.