0

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?

Undermine2k
  • 1,481
  • 4
  • 28
  • 52

1 Answers1

0

Smart Wizard documentation : When a step got focus, the SmartWizard will post the step number to this contentURL and so you can write server side logic to format the content with the step number to be shown next. The response to this call should bethe content of that stepin HTML format.

So, I suppose you musn't send the element with the tag, but only the content.

TCHdvlp
  • 1,334
  • 1
  • 9
  • 15
  • I supposed... But you can still download the complete_demo pack and check what format is sent back by the server side. – TCHdvlp Jun 03 '13 at 00:06