Re: [web2py] Re: Form input not working.

2018-07-09 Thread Maurice Waka
yes, without reload. Am trying out various templates to fit into web2py rules. Please bear with my incompetence, am just looking to get a prototype work,till I get a professional. Thanks. Am working on it. On Mon, Jul 9, 2018 at 1:11 PM Dave S wrote: > > > On Monday, July 9, 2018 at 1:05:38 AM

Re: [web2py] Re: Form input not working.

2018-07-09 Thread Dave S
On Monday, July 9, 2018 at 1:05:38 AM UTC-7, Maurice Waka wrote: > > All I needed is to pass a current value to the db/controller from the > html. After much working, I found that using this was one the best options: > > jQuery('#myform').submit(function() { > ajax('{{=URL('view_sea

Re: [web2py] Re: Form input not working.

2018-07-09 Thread Maurice Waka
All I needed is to pass a current value to the db/controller from the html. After much working, I found that using this was one the best options: jQuery('#myform').submit(function() { ajax('{{=URL('view_searche')}}', ['message'], 'chat'); return false; }); On

Re: [web2py] Re: Form input not working.

2018-07-07 Thread Anthony
First, read the documentation at http://web2py.com/books/default/chapter/29/07/forms-and-validators, as you do not appear to be following it. If for some reason you do not want to use the built-in form functionality, just create an HTML form, and in the action that receives the submission, the

Re: [web2py] Re: Form input not working.

2018-07-07 Thread Maurice Waka
Hi. I'll need your help. Am still stuck at this. I note that only when I refresh the page, will I get the latest 'request.vars.value' gets posted to the controller. 1. Is there a way of auto-refreshing the controller? 2. Is there a better method that this..Following your suggested opt

Re: [web2py] Re: Form input not working.

2018-07-07 Thread Maurice Waka
I managed to go to the basics and got some progress: def searches(): form = FORM(INPUT(_name='message'), INPUT(_type='submit')) code = request.vars.message return dict(code=code) view: Yes

Re: [web2py] Re: Form input not working.

2018-07-06 Thread Anthony
On Friday, July 6, 2018 at 12:49:23 PM UTC-4, Maurice Waka wrote: > > I've changed from method='GET' to method ='POST', name=message ' (the > table name) etc. But I seem to have an issue with the highlighted part. > It's still not posting. Could you please give an example of how this can > work?

Re: [web2py] Re: Form input not working.

2018-07-06 Thread Maurice Waka
I've changed from method='GET' to method ='POST', name=message ' (the table name) etc. But I seem to have an issue with the highlighted part. It's still not posting. Could you please give an example of how this can work?

[web2py] Re: Form input not working.

2018-07-06 Thread Anthony
Your HTML will submit form data to web2py via the URL query string (due to using the GET method), but your controller code is not set up to properly process the form data. Instead, it defines a SQLFORM that does not exactly match the HTML form. See http://web2py.com/books/default/chapter/29/07