Avatar

Not applicable

Hi,

i'm having the strangest behaviour on my form...

in my master page, i have one text field called "Patient"

in my regular page, i have a drop-down list called "timepoint".

this list has two possible values: "Baseline" and "Early".

I added some javascript code to hide some other fields if the user selects "Baseline":

if(this.rawValue == "Baseline") {

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.Dose_baseline_value.presence = "hidden";

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.Dose_baseline_value_unit.presence = "hidden";

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.delay_baseline_value.presence = "hidden";

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.delay_baseline_value_unit.presence = "hidden";

} else {

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.Dose_baseline_value.presence = "visible";

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.Dose_baseline_value_unit.presence = "visible";

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.delay_baseline_value.presence = "visible";

          SPIMCF.SPIM_Compliance_Form.Point_of_violation.delay_baseline_value_unit.presence = "visible";

}

When i try the form, the code works well: the fields are hidden for "Baseline" and visible for "Early".

But either way, the text that was in my field Patient in the master page erases itself each time i select one of the dropdown list value.

I had the exact same code for another form, and everything was working well. Now i have this problem and i have absolutely no clue where the problem is. I checked everything, the names, the links, the xml source... and found nothing.

but it seems it has something to do with the javascript lines: when i delete the lines for hiding the fields, then the Patient field is OK...

hope someone got a solution for me

thanks