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

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

(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"):

  1. 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).
  2. 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">)
  3. Within the <head> part of your site, then add code that appears like something similar to this:

<script type="text/javascript">

//makes it so that it goes after the html document is ready for it

$(document).ready(function() {

   //this ties a onclick event to your button you made

   $("#mysubmitbutton").click(function(){

    //when the button is clicked, it will asychronously post to where you want it to

      $.post("urlthatwasinyouractionequalsattribute.php", 

      { 

         //put all your post variables here, referencing the ids you made earlier

         firstName: $("#firstName").val(), 

         time: $("#time").val() //be sure you don't have a trailing comma on the last one

      },

      function(data) {

        //data is whatever the other website sends back. do whatever you want here...

        alert("Result: " + data);

      });

   });

});

</script>

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.