<commit_before>frappe.ready(function() {
	const { web_form_doctype, doc_name, web_form_name } = web_form_settings;
	const wrapper = $(".web-form-wrapper");
	get_data().then(res => {
		const data = setup_fields(res.message);
		data.doc = res.message.doc
		data.web_form.doc_name = web_form_settings.doc_name

		let web_form = new frappe.ui.WebForm({
			parent: wrapper,
			fields: data.web_form.web_form_fields,
			doc: data.doc,
			...data.web_form,
		});

		web_form.make();
		document.querySelector("body").style.display = "block";
	});

	function get_data() {
		return frappe.call({
			method: "frappe.website.doctype.web_form.web_form.get_form_data",
			args: {
				doctype: web_form_doctype,
				docname: doc_name,
				web_form_name: web_form_name
			},
			freeze: true
		});
	}

	function setup_fields(form_data) {
		const query_params = frappe.utils.get_query_params();

		form_data.web_form.web_form_fields.map(df => {
			if (df.fieldtype === "Table") {
				df.get_data = () => {
					let data = [];
					if (form_data.doc) {<commit_msg>feat: Configured list view for web forms<commit_after>frappe.ready(function() {
	const { web_form_doctype, doc_name, web_form_name } = web_form_settings;
	const wrapper = $(".web-form-wrapper");

	if (web_form_settings.is_list) {
		web_form_list = new frappe.views.WebFormList({
			parent: wrapper,
			doctype: web_form_doctype,
			web_form_name: web_form_name
		})
		document.querySelector("body").style.display = "block";
	} else {
		get_data().then(res => {
			const data = setup_fields(res.message);
			data.doc = res.message.doc
			data.web_form.doc_name = web_form_settings.doc_name

			let web_form = new frappe.ui.WebForm({
				parent: wrapper,
				fields: data.web_form.web_form_fields,
				doc: data.doc,
				...data.web_form,
			});

			web_form.make();
			document.querySelector("body").style.display = "block";
		});
	}

	function get_data() {
		return frappe.call({
			method: "frappe.website.doctype.web_form.web_form.get_form_data",
			args: {
				doctype: web_form_doctype,
				docname: doc_name,
				web_form_name: web_form_name
			},
			freeze: true
		});
	}

	function setup_fields(form_data) {
		const query_params = frappe.utils.get_query_params();

		form_data.web_form.web_form_fields.map(df => {
			if (df.fieldtype === "Table") {
				df.get_data = () => {
					let data = [];
					if (form_data.doc) {
{'fraction_non_alphanumeric': 0.14207419898819562, 'fraction_numerical': 0.0, 'mean_word_length': 3.746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2484212', 'n_tokens_mistral': 1014, 'n_tokens_neox': 884, 'n_words': 140}