Custom job applications

I want to create custom job application(web form) with different questions based on each position. I also want this created web form to send the answers to the job applicant doctype so the HR can see it.
How to do that?

The problem is when I create another job application web form and link it with the job applicant doctype is that the job applicant doctype has certain fixed fields, while the custom web form has other fields (more than the standard ones in the job appicant).

I think it’s not possible.

I created a new doctype: job applicant test, and put this serverside script in job_applicant_test it:

import frappe
from frappe.model.document import Document

class Jobapplicanttest(Document):
pass

@frappe.whitelist()
def insert(data):
try:
data = frappe.parse_json(data)
# doc = frappe.get_doc(“job application test”, data.get(“docname”)) # Correct the DocType name
doc = Jobapplicanttest(data.get(“docname”))
for item in data.get(“questions”):
row = doc.append(“more_information”, {})
row.question = item.get(“question”)
row.answer = item.get(“answer”)

    doc.save(ignore_permissions=True)
    frappe.db.commit()
    return {"message": "success2"}
except Exception as e:
    error_message = str(e)
    frappe.log_error(frappe.get_traceback(), "insert_into_more_info_error")
    return {"message": error_message}

this should add the new questions and answers to a table called more information. However, when i pass any docname to this code it tells me “Doctype not found”