Weird form issue

51 views
Skip to first unread message

Jeff Riley

unread,
Jun 5, 2016, 3:34:16 PM6/5/16
to web2py-users
Hello all.  I have built many forms in Web2py, but I clearly need another set of eyes.  This form only works if I display every signal field for some reason.  I am at a loss as to what I have set wrong.  I will add a file with all the relevant code.  Thank you all very much for you help with this.
Document.docx

Mark Graves

unread,
Jun 5, 2016, 7:14:35 PM6/5/16
to web2py-users
Hey Jeff,

It looks like you created a sqlform expecting all fields, then the form was expecting all fields back, but you only used some of them in the view, so they were not processed.

Specifically, the status field.

You could either set the type of the field to hidden and include it or only include some of the fields.

see this repo:


Check out default/new_training

It bugged me because the error seemed simple and I couldnt figure it out =)

-Mark

Jeff Riley

unread,
Jun 5, 2016, 7:36:19 PM6/5/16
to web2py-users
Seriously.  Well that is just embarrassing.  Thank you so much Mark for your help with this.  In looking back at the other 22 forms I have created, this is the first one where I was pre-populating any of the fields and not showing them.  Thank you for this valuable insight.

All my best.

Mark Graves

unread,
Jun 5, 2016, 8:22:43 PM6/5/16
to web...@googlegroups.com
=)

You're welcome

Happens all the time to me, I find that I learn the most by listening to others.

I couldn't figure it out too, so I dove in.  It caused me to rethink the web2py form and db logic =)

-Mark


--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/fXKc3wNdPsU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff Riley

unread,
Jun 6, 2016, 3:38:03 PM6/6/16
to web2py-users
Now I am truly confused.  I am able to submit the form and create the record in the database, but now
rows = db(db.training).select()  is not returning anything and I cannot delete the record from the SQLGrid view.  I have really wacked something up.

Jeff Riley

unread,
Jun 6, 2016, 3:42:16 PM6/6/16
to web2py-users
Sorry quick update.  Rows is returning information, so I must have a problem with my javascript.  I still however cannot delete the record from the SQLgrid view.

Mark Graves

unread,
Jun 6, 2016, 6:10:37 PM6/6/16
to web2py-users
Hey Jeff,

Most likely the date/time format.

If you can post a sample sqlite file and  SQLGRID code, happy to help.

-Mark

Jeff Riley

unread,
Jun 7, 2016, 9:23:29 AM6/7/16
to web2py-users
Mark.  Could you contact me at javaj...@gmail.com.  I would like to see if you could help me finish this out and what that might cost.
Reply all
Reply to author
Forward
0 new messages