I have following format of input fields.

<td><input name="name" type="text" /></td>
<td><textarea name="description" cols="" rows=""></textarea></td>
<td><input name="image" type="file" /></td>
<td><input name="chkbox" type="checkbox" value="" /></td>

What I want is :

1- When webpage is opened , there should be one line of input fields displayed.
2- When user use the file field for image, then new line of input fields should automatically be created.
3- When all fileds of a row are blank and cursor focus is in the last field of previous line then this blank line should automatically be vanished.

Can anyone help me in this regards
Thanks in advance