How to fetch data from doctype field to webform field

I just want fetch data from a doctype field to webform field…
Anyone please guide me what should we do for that…if you have any snippet sharr here please for better understanding…
@rahy Can you please help into this


That depends on how you create the webform.
What I do is to create webform based on an existing doctype. So the fields will be mapped between the webform and doctype.

Thank you for your response…

There is a field ‘designation’ in doctype ‘Job Opening’ and i want to fetch that designation from doctype and put into webForm ‘Submit your CV’ field automatically…
What should i do can you please tell me or any code you can share here for better understanding…

And also what to do if i want to mapped doctype to webform

1 Like

How did you create your webform?
If you create it from the Website > Webform menu, it will automatically mapped when you select the referenced doctype.

You can use to trigger the method and use the frappe.get_doc to get the fields in the ‘Job Opening’ doctype, return it back to the js and output it the webform field.
I’m sorry, I’m not a programmer so I may not be able to give you the complete snippets.

Note: just a reminder… as this is an open forum, if not really necessary please don’t directly mention people here.
And it also close your opportunities to get help from other people as they might think you only need the person you mentioned.


I did it by checking “Allow Read On All Link Options” in the linked field in webform

Nice to know that you found he solution, with a just one click.

Wow! that is the power of Frappe.

Hi @rahy
I have one webpage that page I need to show the user’s list which is stored in docType, how can I do that

I didn’t find this checkbox neither in webform nor in doctype form.