<form action="" method="GET" class="hidden">
<select data-conv-question="Hello! I'm a bot created from a HTML form. Can I show you some features? (this question comes from a select)">
<option value="yes">Yes</option>
<option value="sure">Sure!</option>
</select>
<input type="text" name="message" data-conv-question="Alright! First, type one word or ask a question.|Okay! you can type one word or ask a question.">
<input type="text" data-conv-question="{{=responses}}" data-no-answer="true">
<input type="text" data-conv-question="This plugin supports multi-select too. Let's see an example." data-no-answer="true">
<select name="programmer" data-callback="storeState" data-conv-question="So, are you a programmer? (this question will fork the conversation based on your answer)">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<select data-conv-question="This is it! If you like me, consider donating! If you need support, contact me. When the form gets to the end, the plugin submits it normally, like you had filled it." id="">
<option value="">Awesome!</option>
</select>
</form>def search():
form = SQLFORM(Post, formstyle='table3cols').process()
code..
responses = responses()
return dict(form=form, responses=responses)Post = db.define_table('post',
Field('author', 'reference auth_user', default=auth.user_id, writable=False, readable=False),
Field('message', 'text', requires=IS_NOT_EMPTY(), default ='', notnull=False),
auth.signature
)--
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/ohTduB-ui7U/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.
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?<form action="" enctype="multipart/form-data" method="POST" class="hidden"><select data-conv-question="Hello! I'm a bot created from a HTML form. Can I show you some features? (this question comes from a select)"><option value="yes">Yes</option><option value="sure">Sure!</option></select><input type="text" name="message" data-conv-question="Alright! First, type one word e.g. 'exercise', or ask a question.|Okay! you can type one word e.g. 'Soy', or ask a question.">
--
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?<form action="" enctype="multipart/form-data" method="POST" class="hidden"><select data-conv-question="Hello! I'm a bot created from a HTML form. Can I show you some features? (this question comes from a select)"><option value="yes">Yes</option><option value="sure">Sure!</option></select><input type="text" name="message" data-conv-question="Alright! First, type one word e.g. 'exercise', or ask a question.|Okay! you can type one word e.g. 'Soy', or ask a question.">What exactly is the problem with that line? What are you expecting and what do you observe?Note, if you're using SQLFORM, you'll need to include {{=form.custom.end}} to make sure the hidden formname and formkey fields are included. Please read the documentation.Anthony
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/ohTduB-ui7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
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.
--
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/ohTduB-ui7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
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:<script>jQuery('#myform').submit(function() {ajax('{{=URL('view_searche')}}',['message'], 'chat');return false;});</script>