ci2016
1
Hello there,
we have a web form, where we have several fields, for example “Subject”.
We can prefill the subject field, by passing GET-Parameters as following:
myurl.com:8000/mypage/?subject=MySubject
This works so far.
We wan’t to prefill the subject field by a POST request, instead of a GET-Request. If we try the following, we get a 400 error:
<form action="myurl.com:8000/mypage/" action="post">
<input type="hidden" name="subject" value="MySubject">
<input type="submit" value="Submit" />
</form>
How to make that work?
umair
2
Did you try setting Default Value in a Doctype/Customize Form?
ci2016
3
This will not work, because the hidden field contains a value based on the page, where the user is.
The value “MySubject” is dynamic, based on the name of a Doc for example.
Hi,
In javascript of your webform, set the value to your field by
$(‘input[name=“name_of_your_field”]’).val(“your value”)
Thanks
ci2016
5
Hi Ranjith,
we want to fill the form by another form which was submitted with POST method. I don’t think the JS Solution is the right one for this case.