Convert FORM elements to JSON snippet