So im loading in content from a PHP(services(controller)/ajaxcontents(function)) through my controller. The function generates dynamic form fields from a database and returns them to the wizard.
They are outputted like so:
<input type="text" class="P_name"
name="dataString[HS1_General_Information_label_1]" value="Jones Mike">
The Javascript that generates the form fields
$(document).ready(function() {
// Initialize Smart Wizard with ajax content load and cache disabled
$('#wizard').smartWizard({contentURL:'services/ajaxcontents'
,contentCache:false});
});
The problem is the content I load in isn't being recognized. For Instance I have a field with class="data"
that is loaded in dynamically and a simple script does not recognize the field exists.
How can I return the data first, then load in the validation for the form based on the fields returned? Sort of like a completed callback for ajax?