Hi Teddy,
On 28/02/13 06:51, Teddy Nyambe wrote:
I am following the book example with modified tables, the form is not
being processed in the controller, what could be wrong with my code below:
I think it's the way you have constructed your form: -
*add_address.html [View]*
{{extend "layout.html"}}
<form>
<table>
<tr>
<td>Enter street: </td><td><input type="text" name="street"
/></td>
</tr>
<tr>
<td>Enter suburb: </td><td><input type="text" name="suburb"
/></td>
</tr>
<tr>
<td>Enter town: </td><td><input type="text" name="town" /></td>
</tr>
<tr>
<td>Enter province: </td><td><input type="text"
name="province" /></td>
</tr>
<tr>
<td colspan = "2"><input type="submit" /></td>
</tr>
</table>
<input type="hidden" name="_formname" value="test" />
</form>
See the sections in the book on hidden fields: -
http://web2py.com/books/default/chapter/29/07#Hidden-fields
...and custom forms: -
http://web2py.com/books/default/chapter/29/07#Custom-forms
In your case, I think that the specific problem is the lack of the
"_formkey" field. You can still customise your form but use
{{=form.custom.begin}} and {{=form.custom.end}}.
HTH
--
Regards,
PhilK
'a bell is a cup...until it is struck'
--
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.