Thanks it worked.
Sorry to bother you again :) One last question : With custom forms, I am
seeing only one difference from SQLFORM, validator error message is coming
on complete line in custom text i.e. RED color background is seen for the
complete line in browser while with the SQLFORM, it used to be upto the
width of entry field only.
Do you know how to control it?
Below is the code :
{{extend 'layout.html'}}
{{=form.custom.begin}}
Name {=form.custom.widget.name}}
{{=form.custom.end}}
On Friday, July 12, 2013 12:31:27 PM UTC+5:30, Niphlod wrote:
>
> it's the error_message argument of any validator...
>
> http://web2py.com/books/default/chapter/29/07#Validators
>
> Il giorno venerdì 12 luglio 2013 08:55:08 UTC+2, Sarbjit singh ha scritto:
>>
>> Actually, I am new to web2py and wasn't aware of it. My requirement was
>> that my form is having a large number of fields and I want to group them
>> logically in html form, the solution provided by you worked well.
>>
>> I have another question : the message that appears on empty field is
>> "enter a value", I want to change this string, can you please point me in
>> which file this message is residing.
>>
>> Thanks,
>> Sarbjit
>>
>> On Friday, July 12, 2013 12:10:51 PM UTC+5:30, Niphlod wrote:
>>>
>>> if you want to do it by hand you need to code your form in html
>>> accordingly..... however: why complicate things when you can use
>>> form.custom ???
>>>
>>> http://web2py.com/books/default/chapter/29/07#Custom-forms
>>>
>>> Il giorno venerdì 12 luglio 2013 08:19:35 UTC+2, Sarbjit singh ha
>>> scritto:
>>>>
>>>>
>>>> I have defined a model in which some fields were marked as
>>>> "IS_NOT_EMPTY", now when I am using SQLFORM generated form, then if a user
>>>> clicked on "submit", then if that particular field is empty, it shows a
>>>> message in red color indicating which field is having empty value.
>>>>
>>>> Now since my requirement wants me to use custom sqlform, I am using it
>>>> like
>>>>
>>>> {{extend 'layout.html'}}
>>>> <form>
>>>> <ul>
>>>> <li>Customer Name<input name="name" /></li>
>>>> </ul>
>>>> <input type="submit" />
>>>> <input type="hidden" name="_formname" value="test" />
>>>> </form>
>>>>
>>>> Now if the name field is empty, it do not highlight the name field and
>>>> do not tell there is a missing value.
>>>>
>>>> Can some one please guide me on how to achieve this using custom
>>>> sqlform.
>>>
>>>
--
---
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].
For more options, visit https://groups.google.com/groups/opt_out.