Welcome, Guest
  • Page:
  • 1
  • 2

TOPIC: adjust ff_formsubmitted message

adjust ff_formsubmitted message 3 years, 10 months ago #1457

Hi,

I would like to see a different message after sending the e-mail. Something like "Thanks for your message, you 'll receive an answer shortly" instead of "form succesfully submitted"
Does anyone know how to do this?

Regards,
snelsnel.
  • snelsnel

Re:adjust ff_formsubmitted message 3 years, 10 months ago #1463

In your Submitted Script, instead of selecting the Library function ff_showSubmitted, choose Custom. Click on "Create code framework", then in the section of the code for "case FF_STATUS_OK:" add in "alert('Whatever you want your message to say.')"
  • avfguy

Re:adjust ff_formsubmitted message 3 years, 10 months ago #1469

Hi avfguy,

thanks for your reply. However, you've got me somewhat confused. When I select my form, click on edit form and then on scripts and custom in submitted scripts I read the below code:

function ff_lid_worden_submitted(status, message)
{
switch (status) {
case FF_STATUS_OK:
// do whatever desired on success
break;
case FF_STATUS_UNPUBLISHED:
case FF_STATUS_SAVERECORD_FAILED:
case FF_STATUS_SAVESUBRECORD_FAILED:
case FF_STATUS_UPLOAD_FAILED:
case FF_STATUS_ATTACHMENT_FAILED:
case FF_STATUS_SENDMAIL_FAILED:
default:
alert(message);
} // switch
} // ff_lid_worden_submitted


Next, I click on create code framework and it just copies the above code.
I have tried to enter my message "bericht verstuurd" instead of message, and instead of alert and after the ; following alert (message);
Again and again it corrupted the script, so surely I am still doing something wrong.
Would you please show me how the code should look?
Is there also a possibility to enter a code which returns the visitor to the homepage after submitting?

Thanks in advance.
Regards,
snelsnel.
  • snelsnel

Re:adjust ff_formsubmitted message 3 years, 10 months ago #1470

The code should look like this :

function ff_lid_worden_submitted(status, message)
{
switch (status) {
case FF_STATUS_OK:
// do whatever desired on success
alert("bericht verstuurd");
break;
case FF_STATUS_UNPUBLISHED:
case FF_STATUS_SAVERECORD_FAILED:
case FF_STATUS_SAVESUBRECORD_FAILED:
case FF_STATUS_UPLOAD_FAILED:
case FF_STATUS_ATTACHMENT_FAILED:
case FF_STATUS_SENDMAIL_FAILED:
default:
alert(message);
} // switch
} // ff_lid_worden_submitted


If the code framework is already there, don't click on "Create code framework" again, or you'll get a second copy of the same thing again and it will mess up your submission script.
  • avfguy

Re:adjust ff_formsubmitted message 3 years, 10 months ago #1476

It rather doesn't seem to function. After inserting and saving the code I can sent the form but there's no message.
I tried the ff_submittedhome from the library which looks great. I even succeeded to change the second line in the message by changing the library-code. But it still shows form succesfully submitted on the first line. Surely, these 3 words must be somewhere in a script waiting for me to change them.
  • snelsnel

Re:adjust ff_formsubmitted message 3 years, 10 months ago #1477

Correction! It worked out fine, thanks. I just needed to replace the alert. Not behind do whatever desired on success but right behind case FF_STATUS_OK:.
So: 1 problem solved.
This leaves me with the second one on the ff_submittedhome code. Do you, by any change, have a solution to this one?

Regards,
snelsnel.
  • snelsnel
  • Page:
  • 1
  • 2
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.78 seconds

Facebook Discount - 40% Off!

Fans of our Facebook page here are entitled to get a 1-year-subscription for the price of a 6-months!

Steps to take:

  • Become a fan on Facebook (Like) here
  • Purchase a 6-months-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of your like and we'll upgrade to the 1-year-subscription

Joomla!® Forms Discount - 40% Off!

Already purchased a forms extension from a different vendor but your requirements changed and now you need a forms extension that is capable of more than just the standards? We help you to keep the costs for a change under control: Get a 40% discount on our professional membership plan! -- meaning timely unlimited access to all current and future commercial extensions, breezingforms themes & apps and Joomla!® templates at crosstec.de, including 1 year of support -- without any website limitations -- Just prove that you previously purchased another forms extension for Joomla!® from a different vendor and you are qualified.

Steps to take:

  • Purchase a 1-year-subscription from here
  • Write a quick email to This email address is being protected from spambots. You need JavaScript enabled to view it. with your username and prove of the purchase for the other form vendor and we'll upgrade to the professional-subscription

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany

Imprint