Hi,
This did the trick. Thank you very much!!
El viernes, 23 de agosto de 2019, 10:09:01 (UTC-5), Annet escribió:
>
> To diasble it:
>
> if form.accepts(..., hideerror=False):
>
>
> to restyle it, restyle:
>
> .error
>
>
> Kind regards,
>
> Annet
>
>
--
Resources:
- http://web2py.com
- http:/
To diasble it:
if form.accepts(..., hideerror=False):
to restyle it, restyle:
.error
Kind regards,
Annet
--
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
It seems selectpicker is causing a change in what gets sent to web2py. In
the browser developer tools, can you check what form data gets sent to the
server with and without selectpicker enabled? Maybe that will provide a
clue.
Anthony
On Tuesday, August 21, 2018 at 4:42:30 PM UTC-4, Rodrigo Go
Did you include all the necessary files?
.selectpicker() is a function defined under bootstrap-select lib and not in
core bootstrap library,hence you need to include that library as well
//silviomoreto.github.io/bootstrap-select/javascripts/bootstrap-select.js
//silviomoreto.github.io/bootstrap
I'm not aware of 'selectpicker'. What does it offer that the default
select widget doesn't?
I'm guessing you're also aware that you can override all of that bootstrap
form style by creating your own formstyle and specifying it on
SQLFORM.factory(formstyle=my_formstyle) call.
I'm not sure if t
jim, thank you for you time, what is causing the error is, if i use
{{=form}} my code works, but if i use the form.custom, my code not work, if
i remove form.element(_id='no_table_cities').update(_class='selectpicker')
in my controller, form custom work again, so i have not idea about what is
Ok, now that we know the problem isn't with SQLFORM.factory lets look
closer at the generated html when using {{=form}} vs the html you typed in.
Specifically:
{{for t in address_type_list:}}
{{=t.type}}
I just tested with {{= form}} and it really worked, so the problem is
between
{{=form.hidden_fields()}}
terça-feira, 21 de Agosto de 2018 às 13:46:55 UTC-3, Jim S escreveu:
>
> Have you tried just displaying the form in your view using {{=form}}.
> Then add a requires=IS_IN_DB to
Have you tried just displaying the form in your view using {{=form}}. Then
add a requires=IS_IN_DB to the fields in your model. I'd do this just to
make sure that SQLFORM.factory is working as expected. Make sense?
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-va
i really think its a bug in form.factory, i tried modify by the controller
too, like
form.element(_id=no_table_cities).update(_class="selectpicker")
and no sucess.
terça-feira, 21 de Agosto de 2018 às 13:31:38 UTC-3, Rodrigo Gomes escreveu:
>
> @auth.requires_login()
> def students():
> form =
@auth.requires_login()
def students():
form = form=SQLFORM.factory(db.person, db.address)
cities_list = db(db.cities.id>0).select(db.cities.ALL)
address_type_list = db(db.address_type.id>0).select(db.address_type.ALL)
person_list = db(db.person.id>0).select(db.person.ALL)
if form.process().accep
@auth.requires_login()
def students():
form = form=SQLFORM.factory(db.person, db.address)
cities_list = db(db.cities.id>0).select(db.cities.ALL)
address_type_list = db(db.address_type.id>0).select(db.address_type.ALL)
person_list = db(db.person.id>0).select(db.person.ALL)
if
How did you define your cities_list?
On Thursday, August 16, 2018 at 4:39:35 PM UTC-7, Rodrigo Gomes wrote:
>
>
> Good evening, folks, I've come here to unveil a mystery, I'm developing an
> application with web2py, (framework that I use about 3 years ago)
>
> I am using sqlform.factory, passing
some one help me pleas
quinta-feira, 16 de Agosto de 2018 às 20:39:35 UTC-3, Rodrigo Gomes
escreveu:
>
>
> Good evening, folks, I've come here to unveil a mystery, I'm developing an
> application with web2py, (framework that I use about 3 years ago)
>
> I am using sqlform.factory, passing 2
The problem is that you are passing the same OPTION objects to SELECT each
time, and when you set the "value" attribute of SELECT, it *mutates* the
OPTION objects. So, the final pass through the loop sets the OPTION
objects, which appear in each of the SELECT objects.
Instead, you should create
The grid code already calls the .process() method (which calls .accepts())
-- you cannot call .accepts() a second time. If you want a custom form, you
need to completely replace the form generated by the grid. But in this
case, there should be no need for that -- just use the grid's onvalidation
> I tried putting the functions you mentioned in the process and validate
> method in the "user" function, but still no luck.
>
If you're talking about the default user() function, then you should have
something like form=auth(), in which case, you cannot use the .process() or
.validate() met
On Tuesday, March 7, 2017 at 1:34:31 AM UTC-5, LoveWeb2py wrote:
>
> If I'm reading this correctly:
> http://web2py.com/books/default/chapter/29/07/forms-and-validators#Hide-errors
>
I was just pointing that out to show how to access the errors -- you can
certainly do so in the controller.
Anth
On Monday, March 6, 2017 at 10:34:31 PM UTC-8, LoveWeb2py wrote:
>
> If I'm reading this correctly:
> http://web2py.com/books/default/chapter/29/07/forms-and-validators#Hide-errors
>
> It looks like everything is now handled in the view and NOT the
> controller, so I'd need to do all of my chec
If I'm reading this
correctly:
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Hide-errors
It looks like everything is now handled in the view and NOT the controller,
so I'd need to do all of my checks in the view. Does that sound right?
On Tuesday, March 7, 2017 at 1:31:32
Thank you, Anthony, but I'm using a custom form via the "user" controller.
Here is my code
{{=form.custom.begin}}
{{form.custom.widget.username.update(_placeholder="Username")}}
{{=form.custom.widget.username}}
See
http://web2py.com/books/default/chapter/29/07/forms-and-validators#The-process-and-validate-methods
and
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Hide-errors.
After processing, errors are stored in form.errors (to get the error for a
given field, use form.errors[f
Thank you, I was completely unaware that this syntax was needed. I will
never get those 2 hrs of my life back, but thanks to you I will sleep well
tonight!!! You are THE BOSS.
On Wed, Dec 21, 2016 at 5:52 AM, Anthony wrote:
> > id="sample_sample_name" class="text" value={{=
>
> id="sample_sample_name" class="text" value={{=row.sample_name}}/>
>
It's always a good idea to check the returned HTML source in the browser.
In this case, you will see you forgot the quotes around the value -- should
be:
value="{{=row.sample_name}}"
You're getting:
That doesn't necessarily sound like the same issue. Please show some code
and explain what you expect and what you see instead (maybe start a new
thread).
On Sunday, May 10, 2015 at 10:01:54 AM UTC-4, Thomas Sitter wrote:
>
> Hi Massimo,
>
> I am getting this same issue (onvalidation function no
Hi Massimo,
I am getting this same issue (onvalidation function not getting called),
but I am use SQLFORM and not Crud so the solution posted does not apply to
me. Has this been resolved elsewhere?
Thanks.
Tom
On Saturday, 15 December 2012 18:27:51 UTC-5, jonas wrote:
>
> Hi.
>
> I have a def
Great idea. I did that and it works perfectly!
On Monday, May 5, 2014 4:00:59 PM UTC-4, Jim S wrote:
>
> Maybe a dropdown isn't the right control for this situation. Have you
> considered an autocomplete widget? How many rows are in your dropdown?
>
> -Jim
>
>
> On Saturday, May 3, 2014 3:13:4
Maybe a dropdown isn't the right control for this situation. Have you
considered an autocomplete widget? How many rows are in your dropdown?
-Jim
On Saturday, May 3, 2014 3:13:40 PM UTC-5, Mark Billion wrote:
>
> How can I set the width of the dropdown menu for an input? The thing is
> way
Thanks for that - I'd assumed the button in the form was related, but let
me try and isolate the other problem and make another app that reproduces
it.
On Saturday, September 28, 2013 10:09:58 AM UTC-7, Anthony wrote:
>
>
> form=crud.create(db.comments)
>> if form.process().accepted
>>
>
> Rig
> form=crud.create(db.comments)
> if form.process().accepted
>
Right, you cannot do that.
> form = SQLFORM.factory(*fields)
> if form.accepts(request, session):
>
The above is perfectly fine (though form.process().accepted is now
preferred to form.accepts(request, session)).
My ques
Hi Anthony,
Thanks for your note. Like I said, I understand the helpful comments on
fixing the issue.
However, what is unclear to me still is Massimo's (and yours here -
https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ
) com
If you follow Massimo's suggestion:
Cancel
everything seems to work fine. What problem do you have after making that
change?
Anthony
On Friday, September 27, 2013 9:00:47 PM UTC-4, Jordan Ladora wrote:
>
> Hi Massimo,
>
> Thanks for your help. I think I'm crystal clear on your explanation
> r
Hi Massimo,
Thanks for your help. I think I'm crystal clear on your explanation
regarding the button, but I'm still confused on the other issue that
Anthony answered previously, despite his and your posts..
In my controller I used:
form = SQLFORM.factory(*fields)
if form.accepts(request,
Actually the problem you have is different. The links you refer to both had
the same problem and it was addressed by Anthony in his post. You cannot do:
form=crud.create(db.comments)
if form.process().accepted
because crud.create already calls process() internally, you it was called
twice.
You
The problems was identified by Anthony in this thread:
https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ
On Saturday, 15 December 2012 17:27:51 UTC-6, jonas wrote:
>
> Hi.
>
> I have a default form that is passed in view: {{=form}
Ahhh f*ck it, then...
On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote:
>
> Hi,
>
> I have the same problem as
>
>
> https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ
>
> https://groups.google.com/forum/?
Can you pack a minimal application that reproduces this?
On Fri, Sep 20, 2013 at 11:18 PM, Jordan Ladora
wrote:
> Ahhh f*ck it, then...
>
>
>
>
> On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote:
>>
>> Hi,
>>
>> I have the same problem as
>>
>> https://groups.google.com/
No, it is not expected. The form.custom.widget items are created when the
form is created. You have added the extra field after form creation. The
.insert() method only inserts into the FORM object's DOM -- it does not
update form.custom.widget.
Anthony
On Wednesday, February 13, 2013 11:33:43
why don't you just use the recommended way for hidden fields ?
http://web2py.com/books/default/chapter/29/07#Hidden-fields
On Wednesday, February 13, 2013 5:33:43 PM UTC+1, Tito Garrido wrote:
>
> Hi Folks,
>
> I am trying to add a hidden field on a SQLFORM like this:
> *form=SQLFORM(db.produ
{{request_details_form.custom.end}}
should be
{{=request_details_form.custom.end}}
On Thursday, 7 February 2013 05:58:45 UTC-6, Andrew Buchan wrote:
>
> Hello,
>
> I'm using a form.custom, but clicking on submit doesn't trigger validation
> or submission. The page just refreshes.
> The code bel
this was fixed in trunk some time ago:
self.custom.delete = self.custom.deletable = ''
On Monday, 21 January 2013 09:55:09 UTC-6, Richard wrote:
>
>
> On Wed, Dec 26, 2012 at 5:55 AM, Alan Etkin
> > wrote:
>
>> form.custom.deletable
>
>
> In this case there is an error in book : {{=form.custom.
On Wed, Dec 26, 2012 at 5:55 AM, Alan Etkin wrote:
> form.custom.deletable
In this case there is an error in book : {{=form.custom.delete}}
At the end of the section custom form :
http://web2py.com/books/default/chapter/29/07#Custom-forms
Just above CSS Conventions.
Richard
--
El martes, 25 de diciembre de 2012 23:35:21 UTC-3, Massimo Di Pierro
escribió:
>
> I am not convinced.
>
> It is in
>
> form.custom.delete
>
> why does it need to be also in
>
> form.custom.delete_this_record
>
> Perhaps in web3py we can rename it but why have it in two places in web2py
I am not convinced.
It is in
form.custom.delete
why does it need to be also in
form.custom.delete_this_record
Perhaps in web3py we can rename it but why have it in two places in web2py?
contains things which are not fields. The
On Tuesday, 25 December 2012 16:43:47 UTC-6, Alan Etk
> Since the name in the default form is "delete_this_record", shouldn't
this be found in form.custom.delete_this_record also?
In case it should, here is a patch for allowing queries to the deletable
widget by it's form name
--
diff -r 13d7e5ff851d gluon/sqlhtml.py
--- a/gluon/sqlhtml.py Tue
El lunes, 24 de diciembre de 2012 19:09:30 UTC-3, Massimo Di Pierro
escribió:
>
> I just added this to the web2py book in trunk. Will push it tomorrow.
>
>
Since the name in the default form is "delete_this_record", shouldn't this
be found in form.custom.delete_this_record also?
--
I just added this to the web2py book in trunk. Will push it tomorrow.
On Monday, 24 December 2012 15:06:28 UTC-6, Carlos Dañel Ferreyra wrote:
>
> Massimo,
>
> Do you know if the documentation has been updated to document this
> property?
> I got here because I couldn't find this in the book in t
Massimo,
Do you know if the documentation has been updated to document this property?
I got here because I couldn't find this in the book in the first place.
Thanks,
Carlos.
On Tuesday, February 22, 2011 11:28:57 PM UTC-3, Massimo Di Pierro wrote:
>
> {{=form.custom.deletable}}
>
> it is not a
I send the app to your gmail address.
On Sun, Dec 16, 2012 at 4:35 PM, Massimo Di Pierro
wrote:
> This should work. I do not see why it does not work. Can you email me,
> perhaps privately, an example app so I can reproduce it?
>
>
> On Sunday, 16 December 2012 09:26:54 UTC-6, jonas wrote:
>>
>>
This should work. I do not see why it does not work. Can you email me,
perhaps privately, an example app so I can reproduce it?
On Sunday, 16 December 2012 09:26:54 UTC-6, jonas wrote:
>
> here is the custom form:
>
> {{=form.custom.begin}}
>
> date: {{=form.custom.widget.created_on}}
here is the custom form:
{{=form.custom.begin}}
date: {{=form.custom.widget.created_on}}
name: {{=form.custom.widget.created_by}}
mail: {{=form.custom.widget.mail}}
link: {{=form.custom.widget.link}}
comment:{{=form.custom.widget.comment}}
{{=form.custom.sub
Hello Jonas,
Can you show us your custom form, the one that does not work. Validation
and form processing are done before the view is execued therefore it cannot
affect form validation and processing. perhaps that is something in the
custom form that prevents error messages from being displayed
ok. another thing is that if I use a regular form, {{=form}}, then
validation works but not if I use the custom form. Also form.process()
works, so the problem seems to be related to custom forms.
On Sat, Dec 15, 2012 at 4:06 AM, Anthony wrote:
>> form=crud.create(db.comments)
>> if form.
>
> form=crud.create(db.comments)
> if form.process().accepted:
>
Crud and form.process() do not go together. Crud is a higher level
interface and automatically handles form processing. Once you call
crud.create(), the form is already processed -- processing it the second
time will not
You could set the "readable" and "writable" attributes of the fields you
want to hide to False. Another option is to use SQLFORM instead of Crud and
pass the "fields" argument with a list of fields to include. In this case,
SQLFORM is probably just as easy to use as Crud.
bio_form = SQLFORM(db.
Looking at the source, it seems possible to add FORM **attributes to
crud just like SQLFORM.
Any cons?.
On Monday, October 17, 2011 2:25:02 AM UTC-4, miroslavgojic wrote:
>
>
> If I use HTML form or mentioned my example result is same.
> *But how in HTML form get hidden fields, and **
> value="e0b5af7b-0cad-483b-979d-4f8b014e1d3a"** - and this value it is
> changed after every form submit?*
>
Yo
On Mon, Oct 17, 2011 at 03:11, Anthony wrote:
> Now that I think about it, this is overkill. It's just a simple form tag
> (no custom web2py classes or attributes), so probably just as easy to hand
> code the HTML (which will also be more clear).
@From Massimo:
you can simply use:
instead of
On Mon, Oct 17, 2011 at 03:16, Anthony wrote:
> On Sunday, October 16, 2011 4:54:34 PM UTC-4, miroslavgojic wrote:
>>
>> And about validation
>>
>> on suggested link
>>
>> it is writhed under point 9 (section 4.10.22.3)
>>
>> *If action is the empty string, let action be the document's address of
On Sunday, October 16, 2011 4:54:34 PM UTC-4, miroslavgojic wrote:
>
> And about validation
>
> on suggested link
>
> it is writhed under point 9 (section 4.10.22.3)
>
> *If action is the empty string, let action be the document's address of
> the form document.*
Yes, it's saying you can leave t
Now that I think about it, this is overkill. It's just a simple form tag (no
custom web2py classes or attributes), so probably just as easy to hand code
the HTML (which will also be more clear).
On Sunday, October 16, 2011 6:05:41 PM UTC-4, miroslavgojic wrote:
>
> After some time and several tr
you can simply use:
instead of
{{=XML(form.custom.begin.replace())}}
On Oct 16, 5:05 pm, Miroslav Gojic wrote:
> After some time and several trays I get solution
>
> in view for custom form I used
> {{=XML(form.custom.begin.replace('action=""', 'action="people"'))}}
>
> and it produce c
After some time and several trays I get solution
in view for custom form I used
{{=XML(form.custom.begin.replace('action=""', 'action="people"'))}}
and it produce code in source:
and my form now work and I have not empty action field
Thanks everybody for help
- - Miroslav Gojic - -
On Sun,
And about validation
on suggested link
it is writhed under point 9 (section 4.10.22.3)
*If action is the empty string, let action be the document's address of the
form document.*
- - Miroslav Gojic - -
On Sun, Oct 16, 2011 at 19:41, Anthony wrote:
> I see the problem -- setting the '_action'
With empty action field I mean:
and this is not empty action field
I used this line in my view:
{{=form.custom.begin.replace('action=""', 'action="%s"' % URL('index'))}}
and output in source is:
I see the problem -- setting the '_action' attribute after the form is
created doesn't affect form.custom.begin, which is what you are using.
Instead, try this in the view:
{{=form.custom.begin.replace('action=""', 'action="%s"' % URL()}}
URL() should generate the URL of the current action (tho
My custom form work fine,
After one day I work to make my HTML5 valid on end it only action in
form make error.
And after that I reed all what I can find but not helped me.
And on my previews post I put my actual and next form definition in
controller (people or index is not to much important wher
My errors in previews post:
form['_action'] = URL(index') - my error - correct is> ->
form['_action'] = URL('index')
my_value - is mean -> URL('controller') #this can be controller or
index or some value.
>From last Anthony replay I figure out why it can't work from view but
how to resolve this i
Is your goal simply to make sure the user gets redirected to 'index' after
submitting the form? If that's the case, then you don't have to set a custom
form action at all. If you leave the form action empty, the form will be
submitted back to the action that generated it (which is how web2py for
On Sunday, October 16, 2011 3:23:01 AM UTC-4, miroslavgojic wrote:
>
> I tray to put mentioned examples into controller after my form definition
>
> form['_action'] = URL(index')
> form.update(_action=URL('index'))
> form.attributes.update(_action=URL('index'))
>
> but it is not happened anything,
form['_action'] = URL('index')
not
form['_action'] = URL(index')
On Oct 16, 2:23 am, Miroslav Gojic wrote:
> I tray to put mentioned examples into controller after my form definition
>
> form['_action'] = URL(index')
> form.update(_action=URL('index'))
> form.attributes.update(_action=URL('ind
I tray to put mentioned examples into controller after my form definition
form['_action'] = URL(index')
form.update(_action=URL('index'))
form.attributes.update(_action=URL('index'))
but it is not happened anything, and if I change my value I just get error
form.update(_action=my_value) - this m
After defining the form, try:
form['_action'] = your_value # e.g., URL('controller', 'function', ...)
You can also do form.update(_action=your_value) or
form.attributes.update(_action=your_value).
Basically, form is a helper object, _action is an attribute of the helper,
and helpers behave li
Thanks for you answer, Anthony! Changed the code as you said and it worked!
:D
2011/8/17 Anthony
> On Tuesday, August 16, 2011 11:35:40 PM UTC-4, Bruno Codeman wrote:
>>
>> Thanks for answering, Denes. I included manually the tags
>> because it wasn't been generated by web2py. I thought it very
On Tuesday, August 16, 2011 11:35:40 PM UTC-4, Bruno Codeman wrote:
>
> Thanks for answering, Denes. I included manually the tags
> because it wasn't been generated by web2py. I thought it very strange, but
> I'll try again tomorrow(It's 00:33AM in Brazil and I just got home, lol).
> Thanks for
Thanks for answering, Denes. I included manually the tags
because it wasn't been generated by web2py. I thought it very strange, but
I'll try again tomorrow(It's 00:33AM in Brazil and I just got home, lol).
Thanks for helping me again.
2011/8/16 DenesL
> Hi Bruno,
>
> not sure if this is the pr
Hi Bruno,
not sure if this is the problem but I believe you can not have nested
forms.
Your view has:
{{form.custom.begin}}
and
© 2011, Groupon Inc. Todos os direitos
reservados.
{{form.custom.end}}
form.custom begin and end contain the opening and closing tags,
so you will
Probably need to see the relevant controller and view code.
Maybe you could use an onvalidation function (see
http://web2py.com/book/default/chapter/07#onvalidation). You might also
consider adding the extra fields directly to the form object (see
http://web2py.com/book/default/chapter/07#Adding-extra-form-elements-to-SQLFORM)
instead of in the view, w
{{=form.custom.deletable}}
it is not a widget. I agree that the name is not the most appropriate.
On Feb 22, 4:07 pm, greenpoise wrote:
> I dont know where my posts are going...anyways, I have a Crud custom
> form. Its set but I am also customizing the layout of the crud update
> form and I cant
I use __ because I like to return locals() instead of a dict()
Em 10/02/2011, às 18:53, pbreit escreveu:
> Why do you use all the underscores? Is it because those variables are
> reserved words? Does it make the variables private or something?
Why do you use all the underscores? Is it because those variables are
reserved words? Does it make the variables private or something?
Hi Panupat,
No problem, web2py has so many useful features they are sometimes
overlooked - especially by me!
Anyhow I hope it will at least reduce some of the complexity for
you :)
-D
On Feb 10, 5:11 pm, Panupat Chongstitwattana
wrote:
> Hi Villas
>
> I'm sorry, I see what you meant now. I wasn't
Hi Villas
I'm sorry, I see what you meant now. I wasn't aware of the factory
feature before
:)
On Thu, Feb 10, 2011 at 11:52 PM, villas wrote:
> On Feb 10, 1:16 pm, Panupat wrote:
>> Villas - I have read the book. The form.custom only works with SQLFORM
>> and crud. I cannot use that same meth
On Feb 10, 1:16 pm, Panupat wrote:
> Villas - I have read the book. The form.custom only works with SQLFORM
> and crud. I cannot use that same method with FORM.
Hi Panupat,
I reread your original post again and I notice that your initial
comment was: "In the book only mentioned how to use custom
How do I add css class,id or java onClick etc to the tags?
On Feb 10, 8:44 pm, Bruno Rocha wrote:
> You can use TAG.dd() , TAG.dl()
>
> here is a working MVC example for a customized contact form, which sends an
> email
>
> http://pastebin.com/jTbGQNZk
>
> --
> Bruno Rochahttp://about.me/rochacbr
You can use TAG.dd() , TAG.dl()
here is a working MVC example for a customized contact form, which sends an
email
http://pastebin.com/jTbGQNZk
--
Bruno Rocha
http://about.me/rochacbruno/bio
Thanks Bruno the DIV(FORM()) trick is really nice.
Too bad there's no dd, dt, dl which is what I usually use for form
layouts. I guess I can always manually append them in.
On Thu, Feb 10, 2011 at 8:32 PM, Bruno Rocha wrote:
>> Anyone know what properties I can call to get the hidden fields?
>
What about widgets? IS_IN_DB() for example. Is there a way to get
those working with a regular FORM without using SQLFORM?
On Feb 10, 8:22 am, Bruno Rocha wrote:
> I almost always use forms in this following way:
>
>
>
> *#Create a DIV to WRAP it a
>
> Anyone know what properties I can call to get the hidden fields?
Using SQLFORM you have form.hidden_fields()
but using FORM you need to use Server side DOM and Parsing
#
*# Create a form with hidden elements*
>>> form =
FORM(INPUT(_type='hidde
Thanks Bruno. That looks very promising I'm trying it out now :)
I got mine working too but it's very amature dir to find what's
there and add bits and pieces of them into the view. /sigh.
On Feb 10, 8:22 pm, Bruno Rocha wrote:
> I almost always use forms in this following way:
>
> ###
I almost always use forms in this following way:
*#Create a DIV to WRAP it all*
>>> div = DIV(FORM())
>>> print div
*#Take the elements of the wrapper using DOM*
>>> print div.element('form')
*#Create some other objects*
>>> table = TABLE()
>>>
Villas - I have read the book. The form.custom only works with SQLFORM
and crud. I cannot use that same method with FORM.
Looks like there are some other properties of the form I can output in
the view... so far I found
{{=form.formname}} - which just give me the word "default"
{{=form[0]}} 1 2
See the Forms and Validators section of the book. You have total
flexibility if you want to go to the trouble of building your own
form. Check out the Custom Forms section of that chapter.
On Feb 10, 12:45 pm, Panupat Chongstitwattana
wrote:
> What I meant was breaking the form down to pieces a
Older version of mysql support maxlength=255 so that is what web2py
does. I am not sure what the best solution wihtout using different
adapters for different mysql versions.
On Jan 30, 7:16 pm, ionel wrote:
> I forgot to say that I use my own function to define the fields in the
> custom form.
>
Hi,
I can not reproduce this with 1.91.6, which version are you using?.
On Jan 30, 8:16 pm, ionel wrote:
> I forgot to say that I use my own function to define the fields in the
> custom form.
>
> db.py:
> db.define_table('a_table', Field('field_name', 'text', length=600))
>
> controller:
> def
I forgot to say that I use my own function to define the fields in the
custom form.
db.py:
db.define_table('a_table', Field('field_name', 'text', length=600))
controller:
def copyField(field):
return Field(field.name, field.type, length=field.length)
form = SQLFORM.factory(copyField(db.a_tabl
+1
On Dec 24, 8:48 pm, rochacbruno wrote:
> Em 24/12/2010, às 16:38, mdipierro escreveu:
>
> > please no more links in code. :-(
>
> I always copy the code from traceback in tickets page and it is copied
> formated.
>
> We need an option to copy raw text from the code in errors page.
>
> Most s
Em 24/12/2010, às 16:38, mdipierro escreveu:
> please no more links in code. :-(
I always copy the code from traceback in tickets page and it is copied
formated.
We need an option to copy raw text from the code in errors page.
Most syntax highliters can do that, so I think this could be eas
Oh, How that happernd.
I'm using new groups. It have advanced edit field. Hides links.
For me it doesn't show links
anyways, code without links follows.
(*But, I'll be more than happy, if I can go with a custom form.*
**
*Only thing that I don't know in that case, is how to deal with upload fiel
1 - 100 of 122 matches
Mail list logo