Welcome, Guest

adjust ff_formsubmitted message
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: adjust ff_formsubmitted message

adjust ff_formsubmitted message 3 years, 7 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, 7 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, 6 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, 6 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, 6 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, 6 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.30 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany