TOPIC:

Breezing Forms and Lightbox 10 years 2 months ago #50177

  • Topic Author
  • sdwek
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
I read the knowledgebase on how to use these two together and I have part of it working properly.

But I cannot get it to close and reload the page upon submission.

When a link is clicked the lightbox opens up with the Breezing Form, and when a user hit submit the data is transmitted to the database. That part is working fine. But then the lightbox remains open and it takes me back to the original form. I want it to close and refresh the page it was on.

I found a site that suggested I should add this line:
onclick="parent.location.reload();parent.SexyLightbox.close()"

But I can't figure out where to add it and how to make it work (was trying the Submit Pieces but it's not working).


Would really appreciate any help.

Thanks
Steve

Please Log in or Create an account to join the conversation.

Re: Breezing Forms and Lightbox 10 years 2 months ago #51400

  • Topic Author
  • sdwek
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
bump.

C'mon, there's even a help topic on lightbox so I know this issue has been solved. I just need to know where to place the right piece of code to close the lightbox.

Emailed support but also haven't heard back.

Please Log in or Create an account to join the conversation.

Re: Breezing Forms and Lightbox 10 years 2 months ago #52396

  • Topic Author
  • sdwek
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
A combination of support and my own research helped solve this problem so I thought I'd post it here and for once in my life give back to the community.

I used : ARI Sexy Lightbox Lite plugin, it's a free extension - google it - for the pop-up box.

Next, I added the following code to where I wanted to link:

<a href="index.php?option=com_breezingforms&view=form&ff_name=ModifiedRetirement&tmpl=component&TB_iframe=true&height=450&width=450" rel='sexylightbox' </a>

Note: rel = 'sexylightbox' is only going to work if you have the ARI Sexy Lightbox installed.

Also, ModifiedRetirement is the name of my form, replace that with the name of your form.


Once that's placed, you need to go into the Breezing Form and edit the form options for your form.

Under Scripts --> Submitted Scripts, place the following code:

function ff_ModifiedRetirement_submitted(status, message)
{
switch (status) {
case FF_STATUS_OK:
// do whatever desired on success

parent.location.reload();
parent.SexyLightbox.close();

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_disable_submitted

Again, change "ModifiedRetirement" at the top to the name of your form.

And voila, you now have a working lightbox that submits your data and reloads the page it's on.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.046 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!