How to insert HTML Forms
Currently you can not simply copy-paste an HTML form code into a Wild Apricot page as it will conflict with the page editor tool and will not work. Here is how to work around that:
Solution 1 - IFRAME and WebDAV
You need to have access to WebDAV feature to use this solution.
- Create new file with .htm (or .html) extension and place the following code inside:
<html>
<head>
<title></title>
</head>
<!-- note body.style -->
<body style="padding:0;margin:0">
<!-- paypal button code here, note form target attribute -->
<form target="_top" ... >
<!-- your code goes here... -->
</form>
</body>
</html>
- Upload the file into your WebDAV folder
- Advice. Create new folder in the root to place such "button" files in.
- Open the page you want to add the button in and enter into Edit mode.
- Using "Insert Snippet" button or HTML mode add the following:
<iframe
src="http:
frameborder="0"
height="<button image height>"
width="<button image width>"
scrolling="no">
</iframe>
where
- <your site url> is your site url (i.e. petfunclub.memberlodge.org). Please note that /resources/ has to be added.
- <path to the uploaded file> is the relative to WebDAV root path to the file. If you uploaded file into root for the WebDAV, it is just a file name, otherwise it is something like MyFolder/myfile.html
- <button image height> and <button image width> - height and width of your paypal button.
Solution 2 - using Javascript
In this case you can place your form HTML code right into page content (using HTML mode), but you have to remove FORM tags from it. (Because there is already a WA-generated FORM around the whole page content and HTML standards do not allow to place one form into another one. )
The workaround is quite straight forward - you need to place javascript code to your submit button which changes the form.action to the one you need:
<input
type="submit"
...
onclick="document.forms[0].action='<form_processing_url>'"
...
/>
where <your url> is the url where your form has to be posted.
 |
Forms have to be posted to an external URL (form_processing_url above) capable of handling posted forms. |