db.define_table('black_market2',
Field('regCode', requires=IS_NOT_EMPTY()),
Field('fullNames', requires=IS_NOT_EMPTY()),
Field('id_number', 'integer', requires=IS_NOT_EMPTY()),
Field('contactNumber', requires=IS_NOT_EMPTY()),
#Field('place', 'reference locations'),
Field('geographical_place', requires=IS_NOT_EMPTY()),
Field('located_at', requires=IS_NOT_EMPTY()),
Field('product', requires=IS_NOT_EMPTY()),
Field('model', requires=IS_NOT_EMPTY()),
Field('productionYear', requires=IS_NOT_EMPTY()),
Field('productSerialNumber', requires=IS_NOT_EMPTY()),
Field('offerPrice', requires=IS_NOT_EMPTY()),
format='%(product)s')
<div id="itemDetails">
<input type="text" name="fullNames" class="field" id="fullName" placeholder="Full Names"/><br />
<div class="target" id="target"></div>
<input type="text" name="id_number" class="field" id="id_number" placeholder="ID Number"/><br />
<div class="target" id="target"></div>
<input type="text" name="contactNumber" class="field" id="contactNumber" placeholder="Contact Number"/><br />
<div class="target" id="target"></div>
<input type="text" name="geographical_place" class="field" id="geographical_place" placeholder="Geographical Place"/><br />
<div class="target" id="target"></div>
<input type="text" name="located_at" class="field" id="located_at" placeholder="Location"/><br />
<div class="target" id="target"></div>
<input type="text" name="product" class="field" id="product" placeholder="What is your product?"/><br />
<div class="target" id="target"></div>
<input type="text" name="model" class="field" id="model" placeholder="What is the Model?"/><br />
<div class="target" id="target"></div>
<input type="text" name="productionYear" class="field" id="productionYear" placeholder="Production Year?"/><br />
<div class="target" id="target"></div>
<input type="text" name="productSerialNumber" class="field" id="productSerialNumber" placeholder="Product Serial Number"/><br />
<div class="target" id="target"></div>
<input type="text" name="offerPrice" class="field" class="field" id="offerPrice" placeholder="Offer Price in Pulas"/><br />
<div class="target" id="target"></div>
<hr />
<input type="submit" class="btn btn-default" value="Register"/>
<input type="reset" class="btn btn-default" value="Cancel"/>
</div>
</div>
<br />
</div>
</form>
<script>
jQuery('#myform').submit(function() {
ajax('{{=URL('blackMarket')}}', '[name=regCode], [name=fullNames],[name=id_number], [name=contactNumber],[name=geographical_place], [name=located_at], [name=product], [name=model],[name=productionYear], [name=productSerialNumber], [name=offerPrice]', 'target, target, target, target, target, target, target, target, target, target, target');
return false;
});
</script>
def blackMarket():
form = SQLFORM(db.black_market2)
if form.accepts(request, formname=None):
return DIV("Message posted",_class="target", _style="color: white; border: solid 1px green; width: 160px; background-color: green; font-weight: bold; padding: 3px; border-radius:5px;")
--
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 the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/d1607588-1a8c-48ca-963e-01060b218d89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
IS_NOT_IN_DB()
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.