Strange, copy and paste lines in the shell...
>>> years = ['2020','2021']
>>> SELECT(*years, _name='year', _id='year', _class='form-control',
requires=IS_INT_IN_RANGE(request.now.year - 1, request.now.year + 1,
error_message="Year isn't correct!"), **{'_v-model': 'year'}).xml()
'<select class="form-control" id="year" name="year" v-model="year"><option
value="2020">2020</option><option value="2021">2021</option></select>'
On Wednesday, 23 September 2020 at 12:18:50 UTC+1 Константин Комков wrote:
> I do form with fields *year, month* and another some fields which must be
> loaded from table in database if year and month != ''.
> I know how to make that with vue attributes, but cun't create them inside
> function in controller. Villas, your example is the same - not work. If I
> add **{'_data-test': 'test'} - when form was generated I have
> data-test="test" in select, **{'_v-model': 'year'} -when form was generated
> I don't have v-model="year" in select.
>
> вторник, 22 сентября 2020 г., 20:50:15 UTC+3 пользователь Константин
> Комков написал:
>
>>
>> I don't know but it's not working:
>>
>> SELECT(*years, _name='year', _id='year',
>> requires=IS_INT_IN_RANGE(request.now.year - 1, request.now.year + 1,
>> error_message="Year isn't correct!'"),
>> _class='form-control', **{'_v-model': 'year'})
>>
>>
>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/a984410c-76a1-4e4d-8063-9a2f047cfa0an%40googlegroups.com.