So the if statement with 'inDecript' is basically saying if the fields
are known show the output and if they are not show the form to get the
input?
I'm not familiar with velocity at all . . I kinda just got thrown into
this task and seem to be lost with xwiki and can't find good working
examples of velocity code (other then little clips, but not a whole
page) or xwiki templates.
Thanks for the pointer though!
~grant
-----Original Message-----
From: devs-bounces(a)xwiki.org [mailto:devs-bounces@xwiki.org] On Behalf
Of Caleb James DeLisle
Sent: Wednesday, June 02, 2010 12:54 PM
To: XWiki Developers
Subject: Re: [xwiki-devs] Passing values in HTML
If the form is posted back to the view page, you can get the values from
the form inputs using velocity code like so:
#if($request.getParameter('inDecript'))
## This parameter is set, assume we have received a post, let's not
show the view page.
#set($inDecript = $request.getParameter('inDecript'))
## do some stuff with the parameters.
#else
## no post, lets show the form
{{html}}
<form ....
{{/html}}
#end
Then you have to use velocity (or groovy/python/ruby/php) to process the
information.
Caleb
Sales, G. (Grant) wrote:
> _____________________________________________
> From: Sales, G. (Grant)
> Sent: Friday, May 28, 2010 01:43 PM
> To: 'devs(a)xwiki.org'
> Subject: Passing values in HTML
>
> I need to create a form simmilar to what a FAQ does but with more
> values.
> I've built my form in HTML but I can't seem to figure out how to pass
> the values within my table to a newly created page
under a specific
> parent with all the values filled in and saved (users need to still
> be able to edit).
>
> The table is simmilar to this. But I've cut out business related
> information and made the form/table smaller (less fields)
>
>
> <html>
> <form>
>
> <table border = "1">
> <tr><th>Number:</th><td><input type = "text"
name =
> "inNum"></td></tr>
<tr><th>Name:</th><td><input type = "text" name =
> "inName"></td></tr> </table>
>
> <table border = "1">
> <TR><TH rowspan = "6">Requirments</th></tr>
<td>Business Driver /
> Need (Description of problem or opportunity)</td>
> <td><input type = "text" name = "inDecript">
> </td>
> </tr>
> <tr>
> <td>Driving Organization</td>
> <td><select name="selOrg" >
> <option value= "1">Not Applicable</option>
>
> </select>
> </td>
> </tr>
> <tr>
> <td> Regulations </td>
> <td> <select name="selReg">
> <option value= "1">Not Applicable</option>
> </select>
> </td>
> </tr>
> <tr>
> <td>Policies </td>
> <td> <select name="selPol">
> <option value= "1">Not Applicable</option>
> </select>
> </td>
> </tr>
> <tr>
> <td>Category </td>
> <td><input type="text" name="inCat">
> </td>
> </tr>
> </table>
> </from>
>
>
> Any help would be great, this Xwiki syntax, forms, tables, templates
> and classes have been driving me nuts, there has to be an easy little
> section of code that can let me pass the values
off to a new page and
> create the page with table I just made, (copy
entire contents of page
besides the
"make new page button" with the fields filled in and
selected)
Grant Sales
Security Operations Analyst
ING
20 Washington Ave South
Minneapolis, MN 55401
Tel: 612.342.7889
Fax: 612.342.3428
Cell: 320.761.0966
Email: grant.sales(a)us.ing.com
www.ing-usa.com
ING. Your future. Made easier. (r)
---------------------------------------------------------
NOTICE: The information contained in this electronic mail message is
confidential
and intended only for certain recipients. If you are not
an intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication and any
attachments is strictly prohibited. If you have received this
communication in error, please notify the sender by reply transmission
and delete the message without copying or disclosing it.
======================================================================
====================== _______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs