Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,494 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,051 people online right now. Registration is fast and FREE... Join Now!




Form validation not running

 
Reply to this topicStart new topic

Form validation not running

imamkomc
post 5 Sep, 2008 - 01:32 AM
Post #1


D.I.C Head

Group Icon
Joined: 9 May, 2007
Posts: 62



Dream Kudos: 225
My Contributions


Hi All,
Why validate="regex" < cfinput> don't running, when
I do looping < cfinput> in < cfoutput query="kamar">.
This is cutoff of my code (nosokomial_infection_rate3.cfm):
CODE

<!---   my query  --->
<cfquery name="kamar" datasource="onkologi">
SELECT  '#jumlah_pasien_nosokomial#' pasien_terkena_nosokomial,
mk.NAMA_KAMAR_RWT_INAP nama,
sum(case
when TGL_selesai_PAKAI_KAMAR is not null then
1
else 0
end) jumlah_pasien_keluar
FROM    MASTER_KAMAR_RAWAT_INAP mk  left outer join PEMAKAIAN_KAMAR pk on mk.ID_KAMAR_RWT_INAP = pk.ID_KAMAR_RWT_INAP and        
((TGL_MULAI_PAKAI_KAMAR >= '#dateformat(form.tanggal_awal,'mm/dd/yyyy')#' and TGL_MULAI_PAKAI_KAMAR <= '#dateformat(form.tanggal_akhir,'mm/dd/yyyy')#')or  
(TGL_SELESAI_PAKAI_KAMAR >= '#dateformat(form.tanggal_awal,'mm/dd/yyyy')#' and TGL_SELESAI_PAKAI_KAMAR <= '#dateformat(form.tanggal_akhir,'mm/dd/yyyy')#'))
group by mk.NAMA_KAMAR_RWT_INAP,mk.KETERANGAN_KAMAR_RWT_INAP
</cfquery>
<!---   end my query  --->


<!---   my code  --->
<cfif #form.cari# neq "">
<cfoutput query="kamar">
<table width="100%"  border="1" cellspacing="0" cellpadding="0" id="border">
<tr>
<td width="33%">Input jumlah pasien nosokomial ruang #nama# :</td>
<td width="67%">  
<cfinput name="xxx" type="text" value="#ListGetAt(xxx,currentrow)#" size="10" validate="regular_expression"  pattern="^[1-9][0-9]*$" required="yes" message="Number input have to more than zero ..">
orang
</td>                    
</tr>
</table>
</cfoutput>
<cfelse>
<cfoutput query="kamar">
<table width="100%"  border="1" cellspacing="0" cellpadding="0" id="border">
<tr>
<td width="33%">Input jumlah pasien nosokomial ruang #nama# :</td>
<td width="67%">  
<cfinput name="xxx" type="text" value="#form.noso[currentrow]#" size="10" validate="regular_expression"  pattern="^[1-9][0-9]*$" required="yes" message="Number input have to more than zero ..">
orang
</td>                    
</tr>
</table>
</cfoutput>
</cfif>
<!---   end my code  --->

Please help me.

Best Regard,
ImamKomC

This post has been edited by imamkomc: 5 Sep, 2008 - 01:35 AM


Attached File(s)
Attached File  sql2.zip ( 6.72k ) Number of downloads: 11
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 05:00PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month