digitalDave
Member
Hello
I have a tabbed form, on one of these tabs are repeat groups.
There are four field elements in the repeat group
house_boat_93_repeat___fore_aft_centre_a
house_boat_93_repeat___fore_aft_centre_b
house_boat_93_repeat___fore_aft_centre_c
house_boat_93_repeat___fore_aft_centre_d
I want to hide one of the fields elements on load, but only on the first repeat.
I have placed this code in the inline javascript section of an element which is not on a repeat group.
Then in form_X.js I have this
What happens is that 'house_boat_93_repeat___fore_aft_centre_d' is hidden on all rows and 'house_boat_93_repeat___fore_aft_centre_a' is still visible
I am unsure if I am using the wrong approach or have made a mistake?
I have a tabbed form, on one of these tabs are repeat groups.
There are four field elements in the repeat group
house_boat_93_repeat___fore_aft_centre_a
house_boat_93_repeat___fore_aft_centre_b
house_boat_93_repeat___fore_aft_centre_c
house_boat_93_repeat___fore_aft_centre_d
I want to hide one of the fields elements on load, but only on the first repeat.
I have placed this code in the inline javascript section of an element which is not on a repeat group.
JavaScript:
hideInputFields(this);
Then in form_X.js I have this
JavaScript:
function hideInputFields(el){
var elem = 'house_boat_93_repeat___fore_aft_centre_a_0';
console.log("hide this element: ",elem);
el.form.formElements.get(elem).hide();
}
What happens is that 'house_boat_93_repeat___fore_aft_centre_d' is hidden on all rows and 'house_boat_93_repeat___fore_aft_centre_a' is still visible
I am unsure if I am using the wrong approach or have made a mistake?
Last edited: