How to add child / grid on web form?

Hi How is there any scripts to add child or grid on a web form?

i can add the field on the desk’s doctype by using this

var child = cur_frm.add_child(“family_condition”);

but it is unsuccessful on the web form
can anyone help me please?