jqueryUI modal set header and fields from code
Hi,
I am trying to customise the example (http://jqueryui.com/dialog/#modal-form) to my needs. What I can't figure out is how I can modify or set the texts of the form (e.g. Name) at runtime. I need to do this because the form will vary depending to server input and I can not antizipate the text. Is there a simple way to do this?
Just to clarify. The names are stored in a structure:
<div id="dialog-form" title="Create new user">
<p class="validateTips">All form fields are required.</p>
<form>
<fieldset>
<label for="name">Name</label>
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
...
</fieldset>
</form>
</div>
The red one is the value I need to change.
Thank you
Olaf