Hello Daniel,

I am interresting in this too... I started implementing, a dummy app
(mainly model). Then, I realise that I would need to write a lot of jQuery,
in order to have all the feature of Gmail contact. So, I am asking myself
if there were not better way to achieve this goal then coding it from
scracht with jQuery... I didn't have time to search the web to much, since
it was just a personal side project and I don't have to much time for it...

The basic of Gmail Contact rely on 3 Things

1) Self submit input (this snippet is a good start :
http://jcapillo.me/myblog/post/Jquery-Code-Snippet-For-Making-A-Login-Form-Submit-Everytime-A-User-Press-Enter.aspx
)
2) SQL database schema that allow to any number of phone numbers to be
inserted for a given contact, that is the easy part : user, phone_number,
phone_number_type (phone number label)
3) Really customized form, that's doesn't use web2py server side form
processing...
    a) No validation requires, since as far as I can see everything pass in
Gmail Contact.
    b) Submit is realized by jQuery ajax
    c) Add input (I did that long time ago, but it was not working
correctly if form was processed by web2py server side :
https://groups.google.com/d/msg/web2py/UK8NZ1VMlNk/0gTIGvDf-_8J)

This thread could be of some interest for subform concept it describe that
could be use with web2py :
https://groups.google.com/d/msg/web2py/oNi87KDsbwk/K-S8roDpVyAJ

I could help you test anything you come up with, just let me know.

This Gmail-Like Contact app could be a nice add on to the web2py appliances
: http://www.web2py.com/appliances

I will following this thread.

Richard


On Sun, Oct 28, 2012 at 6:53 PM, Daniel Gonzalez <gonva...@gmail.com> wrote:

> Hello,
>
> I am trying to implement a contact form (similar to the one in gmail) with
> web2py. I have problems implementing the following feature: the user should
> be able to expand the form, by adding new entries to the contact (for other
> telephone numbers, or other information). The user is presented at first
> with a simple form, and then a "Add" button should show a new input field.
> This field should be:
>
>    - added *without* forcing a reload of the page
>    - it should be processed by web2py when the form is submitted.
>
> I guess this is only possible to be implemented with complicated jQuery
> logic (or similar client-side programming). Or is there a simple way to
> implement this in web2py?
>
> Thanks,
> Daniel
>
> --
>
>
>
>

-- 



Reply via email to