Difference between revisions of "Sandbox"

From Heureka Wiki
Sandbox
Jump to navigation Jump to search
(Removing all content from page)
Line 1: Line 1:
 
+
<div id=contact-form>
 +
{{#form:method=post|style=width:400px|
 +
'''Name:'''{{#input:type=select|id=xc-name|name=title|*{{{name|Select name}}}
 +
{{#dpl:notcategory=Examples|uses=Template:ExampleContact|format=,\n*%TITLE%,,}}}}
 +
{{#if:{{{name|}}}|<small>[{{fullurl:{{{name}}}|action=edit}} (edit {{{name}}} article)]</small>}}<br>
 +
<br>
 +
'''Phone:''' {{#input:name=phone|id=xc-phone|value={{{phone}}}}}
 +
<br>
 +
'''Address:'''<br>
 +
{{#input:type=textarea|style=width:350px|id=xc-address|name=address|{{{address}}}}}<br>
 +
{{#input:type=ajax|value=Load|update=contact-form}}
 +
{{#input:type=ajax|value=Save|update=contact-form
 +
|onClick=document.getElementById('xc-content').setAttribute('value','{'+'{ExampleContact\n{{!}}name='+document.getElementById('xc-name').value+'\n{{!}}phone='+document.getElementById('xc-phone').value+'\n{{!}}address='+document.getElementById('xc-address').value+'\n}'+'}');}}
 +
{{#input:type=hidden|name=templates|value=update}}
 +
{{#input:type=hidden|name=content|id=xc-content}}
 +
}}
 +
</div>

Revision as of 09:07, 25 October 2008

{{#form:method=post|style=width:400px| Name:{{#input:type=select|id=xc-name|name=title|*Select name {{#dpl:notcategory=Examples|uses=Template:ExampleContact|format=,\n*%TITLE%,,}}}}

Phone: {{#input:name=phone|id=xc-phone|value={{{phone}}}}}
Address:
{{#input:type=textarea|style=width:350px|id=xc-address|name=address|{{{address}}}}}
{{#input:type=ajax|value=Load|update=contact-form}} {{#input:type=ajax|value=Save|update=contact-form |onClick=document.getElementById('xc-content').setAttribute('value','{'+'{ExampleContact\n|name='+document.getElementById('xc-name').value+'\n|phone='+document.getElementById('xc-phone').value+'\n|address='+document.getElementById('xc-address').value+'\n}'+'}');}} {{#input:type=hidden|name=templates|value=update}} {{#input:type=hidden|name=content|id=xc-content}} }}