To create a column in the lightning:recordEditForm component in Salesforce Lightning, you need to use layout components like lightning:layout and lightning:layoutItem. This allows you to arrange your form fields in columns. Here's an example of how to do this:
Explanation:
lightning-record-edit-form: This component creates a form that allows you to edit a record. The object-api-name attribute specifies the object, and the record-id attribute specifies the record you want to edit.
lightning-messages: This component displays any error messages related to the form.
lightning
: This component is used to create a flexible grid system to arrange the form fields in columns.
lightning
: This component represents an item within the lightning:layout. The size attribute specifies the width of the column. In this example, size="6" means each column will take up half of the available width (12 is the total grid size).
lightning-input-field: This component is used to add individual form fields. The field-name attribute specifies the API name of the field you want to include in the form.
lightning-button: This component adds a button to the form. In this case, it's a submit button with the label "Save".
By arranging lightning-input-field components within lightning:layoutItem components, you can create a multi-column layout for your lightning-record-edit-form. Adjust the size attribute to control the width of the columns as needed.