Hi,

Currently i have a problem with a sqlform.grid

def retail_rates():
    user = auth.user.id
    customer = auth.user.customer
    customer_service = request.vars.customer_service
    currency = request.vars.currency
    information = data_voip(customer_service)
    if len(information) == 0:
        redirect('voip_accounts')
    code_tariff = "%s%s" % (information[0], information[4])
    query = (db.tariffs_integrated.id==code_tariff)
    form = SQLFORM.grid(query, fields=[db.tariffs_integrated.code_prefix,
                                       db.tariffs_integrated.description,
                                       db.tariffs_integrated.voice_rate],
                        editable=False, deletable=False, create=False,
details=False,
                        )
    return dict(form=form, currency=currency, customer_service=customer_service)

The problem is basicly that i need include in the vars of the form
grid the currency and customer_service because in case that the user
performs a search a error message appears meanwhile the controller
needs both fields (and only keywords was send).

I hay try to add additional fields with

    extra_element = INPUT(_type='hidden', _name='customer_service',
_value=customer_service)
    form[0].insert(-1,extra_element)
    extra_element = INPUT(_type='hidden', _name='currency', _value=currency)
    form[0].insert(-1,extra_element)

But nothing, when i press "search" just kewords parameter is sended,
any ideas how to fix this????

Thanks in advance


Saludos,

--------------------------------
Alfonso de la Guarda
Twitter: @alfonsodg
Redes sociales: alfonsodg
   Telef. 991935157
1024D/B23B24A4
5469 ED92 75A3 BBDB FD6B  58A5 54A1 851D B23B 24A4

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to