Hidden Form Fields Take Space on Form

I have some hidden form fields in my form that need to be sent when the form is posted. When the form displays on the screen these fields occupy lines (move the following components down) even though nothing displays. How should I define hidden fields so they don’t use space on the form? Here is the code for the form (the two hidden input fields display as blank lines above the textarea):

{view:"form", id:"taskform", scroll:true, elements:[ { view:"datepicker", label:"Date", name:"date", dateFormat:"%m/%d/%y"}, { view:"text", label:"Ref", name:"reference" }, { view: 'input', label: '', type: 'hidden', name: 'session_no', value: '@var_session_no_@'}, { view: 'input', label: '', type: 'hidden', name: 'request_id', value: 'MPTASKUPD'}, { view:"textarea", label:"Text", name:"Textarea", inputHeight:'300', inputWidth:'400' } ] }

I also want the textarea to be the width of the screen, but it doesn’t change width regardless of the inputWidth I set. What do I need to do to change this?

Thank you.

Hello,

there is no need to use hidden inputs. Form saves all properties that are set in it by setValues() method, even there are not a view in form for some of these properties.

If you want to use hidden input, please add hidden:true to its config to hide a view:

{ view: ‘input’, label: ‘’, type: ‘hidden’, name: ‘session_no’, value: ‘@var_session_no_@’, hidden:true},
{ view: ‘input’, label: ‘’, type: ‘hidden’, name: ‘request_id’, value: ‘MPTASKUPD’, hidden:true},

Thanks. The “hidden:true” fixed the display.

Did you have any suggestions on my question about the textarea width? My other form fields are the width of the window, but the textarea is narrow and setting “width” or “inputWidth” doesn’t seem to have any effect.