Hello everyone .. it has been a while  ! ... I am back .. alive .. and 
kicking at it again...

OK ! .. I have a problem with data that does not make it to the table when 
the related form is shown to the user through a Modal ( in this case it is 
the NyroModal that I chose to use for this exercise ! ) 
and the form to be displayed is using the solidform plugin scheme !

Here is some code 
my model is a table ( pretty straight forward with 19 fields and some of 
them are set as writable=readable=false  for ultarior purposes) :
db.define_table('soc_league',
             Field ( ....),
             F ....)
             )

in my controller I have :
from plugin_solidform import SOLIDFORM

def createleague(): 
   request_fields = request.vars.fields or 'default'  
   fields = [['league_name','Name_description'],
             ['league_adrss','league_city'],
             ['league_prov','league_postalcode'],
             ['league_country','league_tel'],
             'league_website',
             'league_pic',
             'Affiliated_with',
             'league_jurisdiction']
   form = SOLIDFORM(db.soc_league,fields=fields)                  
   if form.accepts(request.vars, session):
       session.flash = 'submitted %s' % form.vars
       redirect(URL('createleague'))      
   style = STYLE("""input[type="text"], textarea {width:100%; max-height: 
70px;}
                     .w2p_fw {padding-right: 40px; max-width:200px;}
                     .w2p_fl {background: #eee;}""")  
   return dict(form=DIV(style, form))

I created a simple view for it :
createleague.html in which there is only one line :
{{=form}}

then .. on another view, .. like .. test1.html ...  I wanted to test the 
popup modal form ... and the submission of the form through  with 
 NyroModal like this : 
<link rel="stylesheet" href="{{=URL('static','css/nyroModal.css')}}" 
type="text/css" media="screen" />
<script src="{{=URL('static','js/jquery.nyroModal.custom.js')}}" 
type="text/javascript"></script> 

<div>
<a href="{{=URL('default','createleague.html')}}"  class="nyroModal" 
><input name="submit" type="submit" class="button radius" 
style="font-style:normal;font-size:14px;"  value="{{=T('CREATE LEAGUE')}} 
&raquo" /></a>
</div>

<script type="text/javascript">
$(function() {
  $('.nyroModal').nyroModal();
});
</script>


the form shows-up just the way I wanted it  .. no problem there .. ... but 
when I filled it out  ..all the data entered does not make it to the table 
!! ??? ...  
can anyone help me with this .. please .. thank you

Don

-- 



Reply via email to