SAbboushi
asked on
How warn users of data loss when they use browser back button in Joomla component
I am using Joomla 3 with BreezingForms. Great form software.
On multi-page forms, if I press the back button, I lose everything entered.
Doing some searching, I find there are ways using javascript that I can embed in html code somewhere such as this, but I don't know where to add such code... and I think this is more of a hack than adding the code to a place designated by joomla or a component (e.g. in a "run these scripts before form loads" section)
What is best practices way to warn user from within a Joomla component that they will lose data if they click OK?
On multi-page forms, if I press the back button, I lose everything entered.
Doing some searching, I find there are ways using javascript that I can embed in html code somewhere such as this, but I don't know where to add such code... and I think this is more of a hack than adding the code to a place designated by joomla or a component (e.g. in a "run these scripts before form loads" section)
What is best practices way to warn user from within a Joomla component that they will lose data if they click OK?
ASKER
k thanks-
Anyone else that can help me address this issue?
Anyone else that can help me address this issue?
I am by no means a Joomla Expert. But having said that, let's look at this part of the question:
Why is there a multi-page form? Is there any alternative, such as producing a series of page-by-page forms. Each form can update the data base as it is submitted, and each form script can use the prior contents of the data base to prepopulate the data in the next form.
On multi-page forms, if I press the back button, I lose everything entered.That tells me that (1) the multi-page form is a bad idea, and (2) the ability to remember the content may not be well-implemented in Joomla.
Why is there a multi-page form? Is there any alternative, such as producing a series of page-by-page forms. Each form can update the data base as it is submitted, and each form script can use the prior contents of the data base to prepopulate the data in the next form.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ray_Paseur - thanks for that; unfortunately I am limited by the features of the BreezingForms component
GaryC123: that sounds like a great idea! But... Grrrr..... in the Joomla Menu Item, the Link is not editable... any ideas?
GaryC123: that sounds like a great idea! But... Grrrr..... in the Joomla Menu Item, the Link is not editable... any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I create/edit the menu item in joomla! I don't see such an option...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks - found it... but still can't get it to work.
For the BreezingForms component, I need to Create Menu Item, Click "Select" for Menu Item Type, Select "BreezingForms" component which only has the option "Add Form"; so Menu Item Type now shows: "Add Form".
Then in the Advanced Options of the Menu Item, I need to specify the Form Name
The Link field in the Menu Item shows: index.php?option=com_breez ingforms&v iew=form
When I go to the website and select the menu item, the resulting URL is
http://www.leasetobuyhoust on.com/ind ex.php/ten ant-buyer- applicatio n
Creating a Menu Item (named "TBA") as you've suggested with the Link index.php?option=com_breez ingforms&v iew=form&t arget="_bl ank" and then clicking on TBA Menu Item from the site menu gives an error message "[No form id or name provided!]". URL when click on TBA: http://www.leasetobuyhoust on.com/ind ex.php/com ponent/bre ezingforms /view/form /target/?t arget=
Hope we're getting closer... ; )
For the BreezingForms component, I need to Create Menu Item, Click "Select" for Menu Item Type, Select "BreezingForms" component which only has the option "Add Form"; so Menu Item Type now shows: "Add Form".
Then in the Advanced Options of the Menu Item, I need to specify the Form Name
The Link field in the Menu Item shows: index.php?option=com_breez
When I go to the website and select the menu item, the resulting URL is
http://www.leasetobuyhoust
Creating a Menu Item (named "TBA") as you've suggested with the Link index.php?option=com_breez
Hope we're getting closer... ; )
ASKER
Here's what I needed:
And there is the option you mentioned:
Target Window: New Window with Navigation
Perfect! Thanks--
http://www.leasetobuyhouston.com/index.php?option=com_breezingforms&view=form&ff_name=TenantBuyerApplication
And there is the option you mentioned:
Target Window: New Window with Navigation
Perfect! Thanks--
You are better to just put a prominent message on the page not to use the back button without first saving the data.
If you actually want to use the hack then it has to go in the head with the rest of the scripting, and it will almost certainly either not work or screw up something else in the page because Joomla is very scripting intensive and you will almost certainly create a conflict.
As a side note please do not post links to that site on EE. Such links are no longer permit as they create more problems than they solve.
Cd&