JavaScript Validation for Class attributes

Author Message

srikanth mn

Wednesday 19 August 2009 6:28:52 am

Hi.....is it possible to do JavaScript Validation for class attributes. I done want to use server side....Currently i am using inbuilt validation for the "First Name" class attribute....can i do that using JavaScript....

<div class="content-view-full">

<div class="class-Meetings">

<h1>Meeting RFP</h1>
Please fill out the Form below and press the "Submit" button when you are done.
<hr style=" border:thin color:#D1D1C9;" width="735px;" />
{* validation *}

{include name=Validation uri='design:content/collectedinfo_validation.tpl'

class='message-warning'

validation=$validation collection_attributes=$collection_attributes}

{* form introduction *}

<div class="attribute-short">

{attribute_view_gui attribute=$node.data_map.form_introduction}

</div>

<form method="post" action={"content/action"|ezurl} name="rfp">

{* First Name *}

<b>{$node.data_map.first_name.contentclass_attribute.name}<span style="color:#FF0000">*</span></b>

<div style="margin-top:5px;">

{attribute_view_gui attribute=$node.data_map.first_name}

</div>
<br />

{* Form buttons - Processing *}

<div class="content-action">

<input type="submit" class="defaultbutton" name="ActionCollectInformation" value="{"Submit"|i18n("design/ezwebin/full/feedback_form")}" />

<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />

<input type="hidden" name="ContentObjectID" value="{$node.object.id}" />

<input type="hidden" name="ViewMode" value="full" />

</div>

</form>

Please help

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:36:50
Script start
Timing: Jan 18 2025 18:36:50
Module start 'layout'
Timing: Jan 18 2025 18:36:50
Module start 'content'
Timing: Jan 18 2025 18:36:51
Module end 'content'
Timing: Jan 18 2025 18:36:51
Script end

Main resources:

Total runtime0.5840 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0391152.6406
Module start 'layout' 0.00580.0040 740.679739.4766
Module start 'content' 0.00980.5727 780.1563409.8594
Module end 'content' 0.58250.0015 1,190.01568.1250
Script end 0.5839  1,198.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5704160.0002
Check MTime0.00130.2223160.0001
Mysql Total
Database connection0.00070.112310.0007
Mysqli_queries0.540292.5126460.0117
Looping result0.00050.0794440.0000
Template Total0.554695.020.2773
Template load0.00200.347920.0010
Template processing0.552694.624020.2763
Template load and register function0.00010.023510.0001
states
state_id_array0.00090.150010.0009
state_identifier_array0.00080.133820.0004
Override
Cache load0.00170.2913340.0001
Sytem overhead
Fetch class attribute can translate value0.00150.257910.0015
Fetch class attribute name0.00050.082910.0005
XML
Image XML parsing0.00020.026210.0002
class_abstraction
Instantiating content class attribute0.00000.000710.0000
General
dbfile0.00070.1136100.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs