I use jQuery plugin called AJAX form for use in my forms and use this with JSON, http://malsup.com/jquery/form/ , actually i want reload the form after get result and send values for reload the form, or get finally these values from the form when submit but the problem i don´t know how get this
The Script in the index.php :
<script>
jQuery(document).ready(function() {
jQuery('#forma_config').ajaxForm({
dataType: 'json',
success: configto
});
});
function configto(datad) {
if (datad.datoscreate=="ok") {
alert("All saved ");
}
}
Form in the index.php :
<form action="send.php" name="formasend" id="form_config">
<input type="text" name="Phone" value="">
<input type="hidden" name="idform" value="2">
<input type="hidden" name="send" value="ok">
<input type="submit" name="Sending" value="Send Now">
</form>
And in send.php I recieive information for process :
<?php
print '{"datoscreate":"ok"}';
?>
The problem it´s I need get value of idform from input hidden for example for reload the same information, and i don´t know how get it for reload right from JSON or using this plugin, if i don´t know this idform , the form don´t reload because idform it´s missing, and don´t load information right
Thank´s in advanced for the help, regards
code seems to be lacking in some things.
Second you need to send the data. In your code it does not look anything like that.
Finally, the use of PHP's wrong.
I did not try the code. I try to help if you provide feedback.