Hi there,
i use the following code oNscriptInit
/**
- Hide/show a field
*/
if ($ev_conf_gesprek == ‘1’) // Display field
{
sc_field_display({ronde_naam}, ‘on’);
sc_field_display({ronde_datum}, ‘on’);
sc_field_display({ronde_start_tijd}, ‘on’);
sc_field_display({ronde_eind_tijd}, ‘on’);
sc_field_display({ronde_nr}, ‘on’);
sc_field_display({ronde_kleur}, ‘off’);
}
else if ($ev_conf_gesprek == ‘2’)
{
sc_field_display({ronde_naam}, ‘on’);
sc_field_display({ronde_datum}, ‘off’);
sc_field_display({ronde_start_tijd}, ‘off’);
sc_field_display({ronde_eind_tijd}, ‘off’);
sc_field_display({ronde_nr}, ‘on’);
sc_field_display({ronde_kleur}, ‘off’);
}
else
{
sc_field_display({ronde_naam}, ‘on’);
sc_field_display({ronde_datum}, ‘off’);
sc_field_display({ronde_start_tijd}, ‘off’);
sc_field_display({ronde_eind_tijd}, ‘off’);
sc_field_display({ronde_nr}, ‘on’);
sc_field_display({ronde_kleur}, ‘on’);
}
works fine, depending on the value it shows or hides fields. When i insert a new record, all the fields are shown but i wan’t to hide this fields also, based on the value. SO i put this code in beforeInsert. that didi’nt work…
any sugestions? Simply hiding the fields isn’t an option, because when the value is changed i want the field to be shown.