I had to remove the use of show_if and instead implement custom JS to
show/hide fields based on the boolean field. With onvalidation function
being used to preform validation.
Not sure that the show_if feature is properly implemented with regard to
the validation system.
Regards,
James
On F
Hey mate,
I got around that specific validator, however the is_in_set validator
causes the problem. (It’s needed to create the select field in HTML)
I managed to get around it with onvalidation, doing the validation based on
a state of the control but this is adding more logic on the backend and
You can change the field requires in the controller depending on whether
the field should be shown doing something like this
def index():
db.purchase.coupon_code.show_if = (db.purchase.have_coupon==True)
if request.vars.have_coupon:
db.purchase.coupon_code.requires = IS_NOT_EMPT
All,
I am trying to get a solution to the above problem, I am using a
onvalidation function. If have_coupon is checked then I call IS_NOT_EMPTY
and set the form.errors.coupon_code manually. This is not ideal but it
works.
However I cannot seem to get a work around for a dropdown input i.e.
On Monday, January 16, 2017 at 8:01:52 PM UTC-8, Bishal Saha wrote:
>
> I am trying to create a form which will have multiple forms and where the
> first form will have two radio buttons and one of them will work like - if
> it is selected then all the other fields of the other forms wont show an
It's JavaScript, so put it with your JS files and be sure to load it on the
page. You'll need to refer to the relevant documentation regarding how to use
it.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- htt
How do I use that jquery form wizard plugin? I extracted it into my modules
folder but it does not work, I also tried extracting it in my static/js
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.co
I looked into the form wizard, and this worked great for what I was trying
to do. Thank you!
On Wednesday, December 23, 2015 at 12:54:01 PM UTC-8, aetag...@gmail.com
wrote:
>
> I have a form that is rather long, therefore I want to split it into
> sections.
> I am doing this with jQuery conditi
I guess if you are always wanting to show or hide the next 5 rows of the
form then it would be possible to build a less repetitive function that
does this and probably possible to make it accept a parameter rather than 5
which might mean it is a bit more flexible. In general the change event in
A better way would probably be to use an existing form wizard library
designed for this purpose. For example:
http://www.jquery-steps.com/Examples#advanced-form.
Anthony
On Wednesday, December 23, 2015 at 3:54:01 PM UTC-5, aetagot...@gmail.com
wrote:
>
> I have a form that is rather long, ther
Thank you, everyone. You helped me answer #1 and I am appreciative.
--
---
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.
F
The problem seems to be your selector on jQuery. When using SQLForm it
generates a table for you and you are hiding/showing a table
row, jQuery('#no_table_band__row').
On your custom form, you don't have that row, hence it won't work, but you
should have that field and the selector would be jQu
Assuming you are using the default SQLFORM formstyle, which is table.
Use Firebug or similar to look at the id SQLFORM assigns to the table rows
and table cells. Also look at the class SQLFORM assigns to the table,
table rows and table cells.
You will notice a pattern. Set up your custom form
when you are using custom form, please analyze your output source code
first in browser (inspect elements or view source code). after that please
add the jquery things based on the row of field you want to have the jquery
effect (show or hide) when you use custom form.
best regards
On Thursday
There are two separated things here. One is presentation of required
attributes only, the other is validation of the from.
The first one could be solved with the "conditional field" approach
described in the book. If you are not sure what are
the ids for generated form elements, simply view the g
Ok, if I am understanding correctly you want a complex validation. I mean
validating a field base on the input of an other field. Default web2py
validator are applying only to one field at a time. It is possible to do
what you ask for, but it will require that you implement your own
validator. You
Hi Richard,
My tables are pretty large (30-60 columns each), so let me use another
test table.
Let's say we have a table called survey.
If the user selects "Male" in the "Sex" field, "Favourite Car" and
"Favourite Sport" must not be empty.
"Favourite Perfume" and "Favourite Soapie" can be empty.
17 matches
Mail list logo