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