Hi there, im trying to republish data into a form when it comes back from an error, i have been looking for "try to republish" option in every tabs of the form editor without success!! I have chronoforms v4 rc3.3, is this option available yet??
Hi alexis reyes ,
In ChronoForms v4 it's an option in the Show HTML action and is set to Yes by default.
Bob
In ChronoForms v4 it's an option in the Show HTML action and is set to Yes by default.
Bob
Hi there again and thanks for ur reply.
As u say there is a republish data option in "show html" action, and its set to yes by default, now, what im trying to do is to validate if some data was succesfully inserted in DB table, for that im using the following code into Custom code option:
If u can see, as i mention in the comments into the code, when the data coming from the form cannot be inserted a javascript alert is shown informing that, and next it redirects to the form again but an empty one (i know window.location redirects without carry any data between forms) so i would like u to help me, how can i republish data in form if im using this custom code, or whats another alternative to do a Database validation and next republish data if insertion fails!! Thanks for all.
As u say there is a republish data option in "show html" action, and its set to yes by default, now, what im trying to do is to validate if some data was succesfully inserted in DB table, for that im using the following code into Custom code option:
$insert_clase=mysql_query("insert into clase values(NULL,'$_POST[tbx_codclase]','$_POST[tbx_desclase]')",$link);
if($insert_clase){
echo "<script language=\"JavaScript\">";
echo "alert(\"New class has been succesfully inserted into DB\");";
echo "window.location='http://localhost/joomla25/index.php/registro-de-clases';"; /*this redirects to form again */
echo "</script>";
}
else{
echo "<script language=\"JavaScript\">";
echo "alert(\"It has been not possible register the new class, maybe ur trying to insert an existing value\");";
echo "window.location='http://localhost/joomla25/index.php/registro-de-clases';"; /*AGAIN this redirects to form again but an empty one not an refilled one as i would like*/
echo "</script>";
}
If u can see, as i mention in the comments into the code, when the data coming from the form cannot be inserted a javascript alert is shown informing that, and next it redirects to the form again but an empty one (i know window.location redirects without carry any data between forms) so i would like u to help me, how can i republish data in form if im using this custom code, or whats another alternative to do a Database validation and next republish data if insertion fails!! Thanks for all.
This topic is locked and no more replies can be posted.