Arrange Doctype fields into multiple columns - possible?


I’m evaluating ERPNext for my optician practice. I need to create a form for patient refraction (powers of the lenses neded). Tried to create a Docype, added all the fields but I have no idea how to organize the layout. I need something similar to the image attached.

Is it even possible to create?

Yes, this is possible but it may require core customization in Grid Class

is /erpnext/templates/form_grid/item_grid.html the file to look for?

I have tried to insert multi column break in a doctype and it works (to have more than 2 columns). But I don’t know how many columns you can fit in a doctype.

That being said, I know my next suggestion is not answering your inquiry. And it may not be in common format for optician.

But… maybe you can pivot the table and layout it vertically.

             |      L      |     R     |
Sphere       |             |           |
Cylinder     |             |           |
Axis         |             |           |
Addition     |             |           |

This way you don’t have to modify the code.

I think using the child table and prepopulate it using client script will do?

I wouldn’t recommend changing any core classes, unless absolutely necessary. Like rahy and AbdalAliy are suggesting, you could use a child table. Alternately, if you want more control, you could create a custom widget using the HTML field.