Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I put a simple http form on a page to send a simple text field via GET protocal to a web address

Robert Glover July 28, 2011

I am using Atlassian Confluence 3.4.9 and Adaptavist ThemeBuilder. My business user want to know if there is a simple way to create an http form on a Wiki page that has one input text field where the user inputs a short piece of data. Then there should be a SUBMIT button which, which clicked, sends the content of that input text field to a web address (not a Confluence web address). All of my google searches on this show only how to use confluence to submit a form that sends an email. I do not want to submit an email, I want to submit a normal form via HTTP "GET" protocol (or "POST" protocal if that is an option) Maybe the answer is so simple that it is escaping me.

2 answers

1 vote
Robert Glover July 28, 2011

Hoo boy, do I feel foolish. As soon as I posted the question the answer struck like lightning. A simple "html" macro solves the problem! (Assuming, of course, that the html macro has been activated; by default in a vanilla Confluence install the html macro is not active).

To whit:

(left brace)html(right brace)
<center>
<form action="https://foo.com/up" method="GET" target="_blank">
<label for="emailaddress">Enter your e-mail address: </label><input type="text" name="emailaddress" size="60" maxlength="60"/><br />
<input type=hidden name="app" value="tsgoar"
<br><br><input type="submit" value="Request Something" onClick="return confirm('Submit request for app to be pushed to your BB?');">
</form>
</center>
(left brace)html(right brace)

Jim Birch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 2011

The html macro is a fairly serious security issue, ie, allowing any page write to add arbitrary html to a page.

Better to write the html in a user macro!

0 votes
Jim Birch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 2011

The html macro is a fairly serious security issue, ie, allowing any page writer to add arbitrary html to a page. The sky's the limit. That's why it is not active by default.

Better to write the html in a user macro. You only allow one considered action, not just anything. It's possible to limit access to html macro with another plugin but using the user macro is simpler.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events