The following guide will demonstrate how to list multiple fields in a single row.
Example form - https://survey.formyoula.com/online_v5/61f230af44e225001ea2302a
Please use one of the below examples to group specific fields in a row.
Functions to group fields into rows using a list of components IDs.
set_fields_into_a_row('19b1-4293-9d73, 40c6-0e48-3cba');
// Set fields into a row function
function set_fields_into_a_row(row_fields) {
// Get row field size
var row_field_size = 12 / row_fields.split(',').length;
// Get row field component ids
var row_field_ids = row_fields.split(',').map(a => `#component-${a.trim()}`).join(",");
// Set fields into a row
$(row_field_ids)
.wrapAll('<div class="row">')
.addClass('col-xs-' + row_field_size )
.find('.input_label').css('width', 'auto');
}Enable field grouping in Repeat Groups.
We can also listen to other field changes, like a controlling field to update the row grouping.
Below simpler examples can also be used for field grouping.
(Option 1) Group multiple input fields into a row.
$("#component-19b1-4293-9d73, #component-40c6-0e48-3cba")
.wrapAll('<div class="row">')
.addClass("col-xs-6")
.find(".input_label").css("width", "auto");(Option 2) Group multiple input fields into a row.
For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂