On 20 ago, 02:16, Kenneth Lundström <[email protected]>
wrote:
> My view looks like:
> {{extend 'layout.html'}}
> <br>
> {{=T('Sellers in this campaign')}}<br>
> <table>{{for person in person_data:}}
> <tr><td>
> {{=A(str(person.name + " " + person.surname),
> _href=URL(r=request, f='edit_seller', args=[troop.id, person.id,
> person.troop_group]))}}
> </td><td>{{=groups[person.troop_group]['name']}}
> </tr>
> {{pass}}
> </table>
> <br>{{=T('Insert old user to this campaign')}}<br>
> {{=form}}
> <br><br>{{=form_new_person}}
> <br><br><br>
> {{=T('Troop groups')}}<br>
> <table>{{for group in group_data:}}
> <tr><td>{{=A(group.name, _href=URL(r=request, f='edit_group',
> args=[troop.id, campaign.id, group.id]))}}
> </td></tr>
> {{pass}}
> </table>
> <br>
> {{=form_new_group}}
>
> Controller:
> form = SQLFORM.factory(Field('new_seller',
> requires=IS_IN_SET(['kalle','ville'])), label=str(T('New seller')), **args)
The problem is the double closing parenthesis before label, it should
be:
requires=IS_IN_SET(['kalle','ville']), label=T('New seller')), **args)
otherwise the label is not part of the Field definition.
> form['_formname'] = 'add_seller'
>
>
> I changed the IS_IS_DB to IS_IN_SET but that didn t help either.
>
> What part of the view do I need to look at.
>
> Kenneth
>