I'm attempting to refresh a sidebar.php in wordpress on the form submit (that's inside a widget around the sidebar.php).
I've video around the page and when the whole page refreshes, the recording needs to play right from the start.
I want a strategy to simply refresh the sidebar.php when someone submits the shape ... I'm not a specialist php programmer so simple is better!
btw. I'm using formidable wordpress plugin for that form.
thanks ahead of time!
Seems like employment for ajax!
Now, you could do this it on your own, but that might be unnecessarily painful. Rather, I suggest including jquery to your page with the addition of this to your header
(which utilizes the most recent version, that is located on the internet)
Now that you've got jquery loaded, you will find many easy methods to submit your computer data without stifling the flow of things. This is how I'd get it done (I'm presuming that you're using method="publish"):
- Improve your
<input type="submit" >right into a
<button>, so hitting it does not trigger the built-in form submit (which may interrupt your video).
- Set the id attribute of the button to something to ensure that you are able to reference it easily like
<button id="mysubmitbutton">. (When you are in internet marketing, give id characteristics to any or all the shape fields you worry about should you haven't already to ensure that you are able to reference them easily too, like
<input type="text" name="firstName" id="firstName">rather than just
<input type="text" name="firstName">)
- Within the
<head>part of your site, then add code that appears like something similar to this:
Fire up also it should work. Clearly, you will have to alter the values to ensure that it matches your form, etc.
Hope that can help! Please mark as answer whether it did.