How to add a Sign Up form via jQuery
I did have some problems adding another form tag to a page in SharePoint, as SharePoint will not allow other <form> tags to so-exist.
So Using the SharePoint Designer 2010 and just edit the page was not an option.
Next try was to use the Content Editor Web Part and paste a link to a .aspx file with the form on it and hope that the web part wat able to render. But - failure, the web part did trough an error:
So I enden up with two options.
1. The SharePoint Dialog option
So for now I just use the dialog function to show an overlay window with the form in it.
Here is the code:
function SPGuyAweberSignUpForm(){
var options = SP.UI.$create_DialogOptions();
options.width = 300;
options.height = 650;
options.url = "/Pages/aWeberSignUpForm861998399.aspx";
SP.UI.ModalDialog.showModalDialog(options);
}
$("#SignUpLink").bind('click',function(){
SPGuyAweberSignUpForm();
});
dont forget to make a link on the page and go into the html editor and add a ID="SignUpLink". The javascript was just added to my main.js that is called on the master page.
2. the Page Viewer Web part
It ended up by being much easier to just add a Page Viewer Web Part and that put in the path for the .aspx page that had the form on it.
Now for the screencast:
http://screencast.com/t/vfBWaXcdlmnb