Reply To: Prevent page reload

#4576
Matt Stern
Participant

Sure, let me just clarify a little to see if that helps-

Originally, I had multiple different signup forms on the same page using the id=”” argument in the plugin shortcode.

I then moved to surrounding each in a div with a unique id, so I could choose which to show and hide using a simple menu with an anchor/href/link to each div, and :target pseudo in CSS to show it.

My final issue that I feel can be solved without too much effort – seeing from the post I found elsewhere that I will link to in a bit – is re-appending whatever the current fragment is after your plugin rewrites the url. This is the best possible option (besides rewriting the submission process to use jQuery/AJAX as you suggested) that I have found, as I am aware that your plugin wouldn’t know what div it was surrounded by.

In “Option B” of this post http://stackoverflow.com/questions/2317508/php-get-value-from-url-after-sign/2317518#27370176 it describes how you can use javascript to pass this info to the PHP code used when those links are clicked. Whether this actually works, I don’t know, but it seemed like it was the right path.

That’s why I am asking here, because I feel like it is tweaking of the code snippet in the SO link above, combined with simply adding the variable into the plugin code in a couple spots.

Link to my signup page: http://summitsharks.net/volunteer-signup-page/

Right now I have it all showing the same exact form (id=”1″) but once functional I’ll be creating a unique one for each link in the menu. Each is however surrounded by a uniquely id’ed div.

Thanks again for taking the time to read through my essays here.

  • This reply was modified 9 years, 5 months ago by Matt Stern.
  • This reply was modified 9 years, 5 months ago by Matt Stern. Reason: add link