Looking to get some ideas on how to do the following:
I have a form that is filled out by my customer. I use a BWD ButtonPlus2 stack to create a Submit Button.
The form associated with the Submit Button is simply a form I hand coded and only consists of a hidden field that is sent to my own PHP page for processing. The rest of the items on the page are displayed from a MySQL DB using PHP to access the DB and display in a table.
I do it this way as I have other buttons on the page to Add an Item, Delete the Order, Edit the Info, etc.
Anyway, what I want (if possible) is a stack that will display an alert box to display the user’s email address and allows them to click “ok” if its Ok or “cancel” if wrong and they can go back to fix it.
SO… I suppose all I really need is — a stack that will allow me to display an alert box when a button is pressed. I guess I didn’t need all the other info.
My reply is not the solution you’re seeking, but perhaps may work better for you. It does for me.
Instead of one multifunction-button I am using two buttons side-by-side (one under the other on phones). First is the “Cancel and go back?” button and the other is “Submit”. These two buttons are colored differently – so that they can not be clicked by mistake, without looking.
This is a simpler and, I think, a better solution for what you want to achieve.
There is more info on the page and I use accordions to show an hide stuff. So they may not even see their email on the page when they hit Submit.
I was doing it with jQuery on a site I created in RW 6. But, the solution I used then is not working with the new RW8 version of the site. Maybe a conflict with the theme I’m using or something.
I guess I’m confused by what you are asking for.
Are you wanting a modal window that open when you press a button?
Then you want the modal to have a submit button and a cancel button?
And somehow the modal is going to get the email address from somewhere on the page?
I need a stack that will popup a dialog box when a button is pressed. I can populate the variable data (email) with some PHP. It would need a Cancel and Submit button on the dialog box.
I can handle the form submit, etc. afterwards. I just need to be able to get which button was pressed.
Anyway, I was doing this with jQuery – using jQuery, Zebra Dialog (an older version), and jQuery onclick event.
It was something I had setup 6 years ago and it is still working, but it does not work with the new Theme, RW8, etc, etc. So either I need to upgrade to a newer version of jQuery or try to debug the code I am using now. Maybe re-write it with a newer version of jQuery and Zebra Dialog.
That will probably have to be the route I go. But thought I’d see if there was a RW stack that could popup a modal when a button is clicked. Thought it would be a quicker solution.