hi guys,
with the big help of jsb (he is really great ) I could get this work
http://www.scriptcase.net/forum/showthread.php?6418-form-field-(select)-color-background-color-and-lock!
now i can ON AJAX ONCHANGE event to be able to change the background color and disable a field/fieldsā¦ the trick is to specify the row counter that you are working on, otherwise any change in the field will disable/ change color of all the form (in multiple records) so it is uselessā¦
now, i have something like this:
If({field1} == '1')
{
sc_ajax_javascript('js_color_grey',array({row_cnt}));
I have also a js method says:
var field1 = 'id_sc_field_field1_'+row_nr;
document.F1[field1].style.backgroundColor = '#cccccc';
add to that, the parameter of the js that i added ārow_nrā and the new field that says row_cnt and the counter variableā¦ just as jsb explained in my previous postā¦
HOW about making this work onLoad? i tried the same and read in macros, found that this macro only works for ajax, how if i want to onLoad checks my field (fields) and apply those disable/background colors accordingly?
i tried to create a php method and failed,
i tried to use sc_field_disable it works fine on condition, but it disables all rows in the form, without being able to distanguish which row to work onā¦
please, i need the form to also color/disable specific fields based on other fields conditionsā¦ not only on ajax on changeā¦
i mean in multiple records form, and to understand in which row that is appliedā¦
if i can further to set specifc option/data in some field based on other field selection, this will be really great
all your help is appreciated guys, i know do annoy sometimes, believe me i am sure many of my level people will search for such stuff