Set default for collapsible section break state to expanded

Is there a way to set the default collapsible section break to be expanded?

So far, I have tried to set the Default value of the section break property to 0 or 1, then tried collapsed or expanded without success. It didn’t look like the json file had any options.

Is there a client side scripting method that could accomplish this?

1 Like

If you uncheck the “collapsible” check box in your doctype field, it should work

1 Like

If you want a section to be collapsible and be expanded lets say at the time of onload you can use custom script to do so. You can change the trigger from onload to any other field as required.

frappe.ui.form.on('DocType_name', {
	onload: function(frm) {
		frm.fields_dict['name_of_collapsible_section'].collapse();
	}
});
6 Likes

Thank you. This is exactly what I was looking for.