Forum Post: RE: How can we set field values in Onsubmit event handler for New pages

Status
Not open for further replies.
S

Santosh Patel

Guest
Hi Sudhakar, We now have a clear picture of your problem. rbf_setFieldContent sets the HTML content of a field on the current page. This seems to set the value visibly the way you want it but it also removes the HTML Input element associated with the field. Using this removes the field from the form submit. Could I urge you to use the following approach? (the visual feel is a bit different to what you want) - rbf_setFieldValue('city','Hyd') followed by rbf_setFieldDisabled('city',true) or with your original (visual) requirement you can do the following: - add a hidden input field to carry the value - set the actual value using rbf_setFieldValue function sample code: var city = document.createElement('input'); city.name='city'; // This should be the integration name of the field city.type='hidden'; document.theForm.appendChild(city); rbf_setFieldValue('city','Hyd');

Continue reading...
 
Status
Not open for further replies.
Top