fields are not showing when checked checkbox field on load of the form

fields are not showing when checked checkbox field on load of the form

Hi,

i am trying to show fields when checkbox field is checked and if not checked then not show that is hide in the load of the form on create or edit of the form.

SO, have created workflow on created or edited on load of the form .
The code is as shown below: (ship_out field is checkbox field and its value is Yes)

if(input.ship_out == "Yes")
{
show ship_out_date;
show number_of_boxes1;
show To_Do;
show Cost;
show Units;
show Extra_charge;
show Box_Charge;
show remark;
show Boxes_left_for_storage;
}
else
{
hide ship_out_date;
hide number_of_boxes1;
hide To_Do;
hide Cost;
hide Units;
hide Extra_charge;
hide Box_Charge;
hide remark;
hide Boxes_left_for_storage;
}

so,
they are not showing when checked checkbox field on load of the form, it is working like they are hiding all fields when not checked.

attached file is showing the fiels link name and its value.

Pls help and let me know if need other details.



Thanks and Regards,
Sidhant A.