to select ↑↓ to navigate
Developer References

Developer References

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Form Scripts

Form Scripts lets you add client side logic to your Forms. You can write Form Scripts for automatically fetching values, adding validation or adding contextual actions to your Form.

Form API

frm.set_df_property

Change the docfield property of Child Table field.

// set a field as read only
frm.fields_dict['child_table_field_name'].grid.update_docfield_property('warehouse', 'read_only', 1)

// set a field as mandatory
frm.fields_dict['child_table_field_name'].grid.update_docfield_property('warehouse', 'reqd', 1)

frm.fields_dict[child_table_field_name] နေရာတွင် frm.get_filed(child_table_field_name) ကိုလည်း အသုံးပြုနိုင်ပါသည်။

This function is used to display a specific document (Form) in the Frappe system as a clickable link.

frappe.get_form_link('Doctype', name)

frm.clear_table

Clear child table and refresh table.

frm.clear_table('child_table_field_name');
frm.refresh_fields('child_table_field_name');

cannot_add_rows

frm.set_df_property('child_table_field_name', 'cannot_add_rows', true);

cannot_delete_rows

frm.set_df_property('child_table_field_name', 'cannot_delete_rows', true);

grid.get_select_children

frm.fields_dict.child_table_name.grid.get_select_children();

TODO

Last updated 2 months ago
Was this helpful?
Thanks!