FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update button - return to submission page
#1
Star 
[Image: getfile.php?id=216751&a=2d06a14389fff29d...=0.png&i=1]

Hi,

I have created a form and I have set it up to send Email whenever I create & update a submission. It works beautifully.. But I does not take to back to the Submission List page.

Can I make some changes somewhere that when I "update" a submission it should ALSO take me to the Submission list page.

I'm from a non-english speaking country, pardon me & let me know if you were able to understand my question or If I need to be more clear. Smile


Regards,
FireDragon Smile

[Image: getfile.php?id=216752&a=ff6bb24aba5e7e8a...=1.png&i=1]
Reply
#2
Hi Firedragon,

Interesting! Unfortunately, there's nothing in the script to allow for this. However, if you don't mind hacking it a bit and are well aware that future upgrades may overwrite this change, you can add the functionality like so:

Edit the /admin/forms/edit_submission.php file and find these lines on 36-39:

PHP Code:
if (!$g_success)
  {
      
$failed_validation true;
  } 

After those, add an else-clause:

PHP Code:
if (!$g_success)
  {
      
$failed_validation true;
  }
  else 
  {
      
header("location: submissions.php");
      exit;
  } 

That should redirect you back to the main submissions page after you update a submission.

- Ben
Reply
#3
Thanks Ben,

Will try it out & let you know if it worked. Smile

'FormTools' - What you guys have developed is one of the coolest softwares I have ever come accross.. It has made my life a bit simpler. You guys rock.. Smile
" May the Lord, mighty God, bless and keep you forever;
Grant you peace, perfect peace, courage in every endeavor."


Regards,
FireDragon.

(Apr 17th, 2012, 11:26 AM)Ben Wrote: Hi Firedragon,

Interesting! Unfortunately, there's nothing in the script to allow for this. However, if you don't mind hacking it a bit and are well aware that future upgrades may overwrite this change, you can add the functionality like so:

Edit the /admin/forms/edit_submission.php file and find these lines on 36-39:

PHP Code:
if (!$g_success)
  {
      
$failed_validation true;
  } 

After those, add an else-clause:

PHP Code:
if (!$g_success)
  {
      
$failed_validation true;
  }
  else 
  {
      
header("location: submissions.php");
      exit;
  } 

That should redirect you back to the main submissions page after you update a submission.

- Ben

Reply
#4
BULL's EYE

What you suggested worked BEN. I really appreciate your help..

Regards,
FireDragon


(Apr 17th, 2012, 8:13 PM)firedragon Wrote: Thanks Ben,

Will try it out & let you know if it worked. Smile

'FormTools' - What you guys have developed is one of the coolest softwares I have ever come accross.. It has made my life a bit simpler. You guys rock.. Smile
" May the Lord, mighty God, bless and keep you forever;
Grant you peace, perfect peace, courage in every endeavor."


Regards,
FireDragon.

(Apr 17th, 2012, 11:26 AM)Ben Wrote: Hi Firedragon,

Interesting! Unfortunately, there's nothing in the script to allow for this. However, if you don't mind hacking it a bit and are well aware that future upgrades may overwrite this change, you can add the functionality like so:

Edit the /admin/forms/edit_submission.php file and find these lines on 36-39:

PHP Code:
if (!$g_success)
  {
      
$failed_validation true;
  } 

After those, add an else-clause:

PHP Code:
if (!$g_success)
  {
      
$failed_validation true;
  }
  else 
  {
      
header("location: submissions.php");
      exit;
  } 

That should redirect you back to the main submissions page after you update a submission.

- Ben

Reply
#5
Hi

is it possible the same way i can make the update button do the add function also... i have user who some time get confused with the update and add buttons
Reply
#6
Hey there,

Yes, you can redirect the page after it's updated as well. You will need to make updates to the code.

Cheers,

Joe
Reply
#7
(Mar 10th, 2014, 7:54 AM)Joe Wrote: Hey there,

Yes, you can redirect the page after it's updated as well. You will need to make updates to the code.

Cheers,

Joe


Hi Joe

thanks for the reply could please provide me a way through as as i am not so good in PHP as i am baisically a server admin. Baisically what i want is either after update it runs the add function esle combine the add and update button into one
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)