[web2py] Re: Star Rating

2016-02-07 Thread Massimo Di Pierro
Thanks for checking the code! It helps us more than you think. On Sunday, 7 February 2016 09:41:28 UTC-6, Ron Chatterjee wrote: > > Yes. It works. My eyes fooled me as I copied and pasted from here: > > >

[web2py] Re: Star Rating

2016-02-07 Thread Ron Chatterjee
Yes. It works. My eyes fooled me as I copied and pasted from here: https://github.com/mdipierro/web2py-recipes-source/blob/master/apps/04_advanced_forms/web2py.app.star_rating.w2p?raw=true

[web2py] Re: Star Rating

2016-02-06 Thread Ron Chatterjee
I have the view like this using plugin and still didn't work (insert values in the database). Any thoughts? {{extend 'layout.html'}} {{=form}} $(document).ready(function() { $("form").submit( function() { $("[name=rating]").removeAttr("disabled"); } ); }); On

[web2py] Re: Star Rating

2016-02-06 Thread Massimo Di Pierro
In the other thread you were missing form.process() in controller. ;-) could it be the same problem? On Saturday, 6 February 2016 14:01:43 UTC-6, Ron Chatterjee wrote: > > I have the view like this using plugin and still didn't work (insert > values in the database). Any thoughts? > > >

[web2py] Re: Star Rating

2013-02-11 Thread Alan Etkin
Here is the code that worked for me when added to the view. ... Good catch, I should have added the .ready call to wait until the form element is available. The rating plugin worked without this. We could fix the plugin script so there's no need for the workaround. -- --- You

[web2py] Re: Star Rating

2013-02-10 Thread Alan Etkin
So the star rating is definitely not making its way back to the server. I'm guessing it should look like the following: Storage {'rating': '5', '_formkey': '7c32617c-2136-4d8d-ad54-ea7ae454e551', '_formname': 'song/create', 'title': 'Thriller'} I have reproduced the issue with firefox

[web2py] Re: Star Rating

2013-02-10 Thread Alan Etkin
So the star rating is definitely not making its way back to the server. Right. This seems not to be a web2py issue: the plugin is setting a disabled attribute for the rating input, so the field is omitted on processing. I found a workaround, adding this to the view: {{=SCRIPT(

[web2py] Re: Star Rating

2013-02-10 Thread Michael Gheith
Hello Alan, I added this code to the view and it is still not working. Can you post your working .w2p somewhere? It makes sense that the select field that represents that stars is somehow disabled. Hope to hear from you soon Alan! Best, M.G. On Sunday, February 10, 2013 8:12:49 AM UTC-6,

[web2py] Re: Star Rating

2013-02-10 Thread Michael Gheith
Here is the code that worked for me when added to the view. Send all your thanks to Alan Etkin!! script $(document).ready(function() { $(form).submit( function() { $([name=rating]).removeAttr(disabled); } ); }); /script On Friday, February 8, 2013 4:52:19 PM

[web2py] Re: Star Rating

2013-02-09 Thread Michael Gheith
I printed the request.vars to the console, and this is what I got after form submission: Storage {'_formkey': '7c32617c-2136-4d8d-ad54-ea7ae454e551', '_formname': 'song/create', 'title': 'Thriller'} So the star rating is definitely not making its way back to the server. I'm guessing it should