Warning: include_once(/home/loudcanv/public_html/includes/location_functions.php): failed to open stream: Permission denied in /home/ajaxcrud/public_html/preheader.php on line 44

Warning: include_once(): Failed opening '/home/loudcanv/public_html/includes/location_functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ajaxcrud/public_html/preheader.php on line 44
ajaxCRUD.com » ajaxCRUD API :: modifyFieldWithClass - Use PHP & AJAX to CRUD from a mysql database table (create / read / update / delete)

ajaxCRUD.com

» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAX

   by loud canvas media

AjaxCRUD Class Documentation / Reference Material

<< Reference overview
<< Home

modifyFieldWithClass

add a css class to a field (used for things like jquery validation or field masking)
void modifyFieldWithClass( String fieldName, String cssClassName )
Use this function when you wish to do some javascript/jquery validation or simply add a class to it to format it a certain way. For example, you'd use this function if you wanted make a field required (when adding) or to mask certain fields like phone number.

Details

Type function
Returns
Default void

Parameters

fieldName
name of the field you want to format
cssClassName
name css class(es) to be applied

Example

Example 1:
   $tblDemo->modifyFieldWithClass("fldDateField", "datepicker");

Example 2:
    $tblDemo->modifyFieldWithClass("fldZip", "zip required");


Any javascript validation based on the applied css class must be in the file validation.js

See also

New, Edit

 

"Thanks a bunch for this class. Man, it really does make turning around a CRUD quickly with cool fade effects for managers. Thanks for making this."
~Fred

What is a business/commercial website?

A commercial website is one created for a business, for which purpose is generating revenue or cash flow of any type (and that isn't under a non-profit organization). So if you're selling a product, selling advertisement, selling a service, or just marketing a commercial business, your site is commercial. A company website is also commercial even if it doesn't sell anything, as it's purpose is to front a commercial company.
Close