What are you trying to do? What is the error message?
|
Additions & Remodeling |
|
Appraisers & Attorney |
|
Appliances |
|
Builder |
|
Cleaning Services |
|
Flooring |
|
Handyman |
|
Home Decorating |
|
Home Inspection |
|
Landscape, Deck & Fences |
|
Moving & Storage |
| [/ref]
Plumbing, HAVC & Electrical |
|
Title & Escrow Services |
|
Other Services (Pool, Home
Security..) |
I have tried to play with this for a week, I can't make it work, read similar topic from this board, none of them worked. here is code bellow but unfinished. coz, it always throw me error. the problem I am having is to display and updating the list, radio and checkbox value. your help would be greatly appreciated! <table> <tr align="left" valign="top" > <td width="450" height="22" valign="bottom">How many years experiences do you have?<br> <cfselect name="year_experience" class="formfield"> <cfoutput> <option value="#quser.experience#" selected>#quser.experience# </option> </cfoutput> <option value="3">1 - 3 years</option> <option value="5">3 - 5 years</option> <option value="8">5 - 8 years</option> <option value="10">8 ...
I have tried to play with this for a week, I can't make it work, read similar
topic from this board, none of them worked.
here is code bellow but unfinished. coz, it always throw me error.
the problem I am having is to display and updating the list, radio and
checkbox value.
your help would be greatly appreciated!
<table>
<tr align="left" valign="top" >
<td width="450" height="22" valign="bottom">How many years experiences
do you have?<br>
<cfselect name="year_experience" class="formfield"> <cfoutput>
<option value="#quser.experience#" selected>#quser.experience#
</option>
</cfoutput>
<option value="3">1 - 3 years</option>
<option value="5">3 - 5 years</option>
<option value="8">5 - 8 years</option>
<option value="10">8 - 10 years</option>
<option value="20">10 years +</option>
</cfselect></td>
</tr>
<tr align="left" valign="top" >
<td height="22" valign="bottom"><span style="font-size: 11px">Are
you a licensed contractor?</span></td>
</tr>
<tr align="left" valign="top" >
<td height="47">
<!--- <cfset value=#quser.licensed#> --->
<cfif isDefined("quser.licensed") AND quser.licensed EQ "Yes">
<label>
<cfinput type="radio" name="licensed" value="Yes" checked="yes">
Yes</label>
<br>
<label>
<cfinput type="radio" name="licensed" value="No">
No</label>
<cfelse>
<label>
<cfinput type="radio" name="licensed" value="Yes">
Yes</label>
<br>
<label>
<cfinput type="radio" name="licensed" value="No" checked="yes">
No</label></cfif> </td>
</tr>
<tr align="left" valign="top" >
<td height="32" valign="middle">What type of <span style="font-size:
11px">work do you do </span>?</td>
</tr>
<tr align="left" valign="top" >
<td><table width="406" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="23" align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif quser.offered_work EQ "Additions & Remodeling"> checked</cfif> ></td>
<td width="161" align="left" valign="top">Additions &
Remodeling</td>
<td width="28" align="left" valign="top">
<cfinput type="checkbox" name="offered_work"
value="#quser.offered_work#" <cfif #quser.offered_work# EQ "Appraisers &
Attorney"> checked</cfif> ></td>
<td width="194" align="left" valign="top">Appraisers &
Attorney</td>
</tr>
<tr>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work"
value="#quser.offered_work#" <cfif #quser.offered_work# EQ "Appliances">
checked</cfif> > </td>
<td align="left" valign="top">Appliances</td>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Builder"> checked</cfif> > </td>
<td align="left" valign="top">Builder</td>
</tr>
<tr>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Cleaning Services"> checked</cfif> > </td>
<td align="left" valign="top">Cleaning Services</td>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Flooring"> checked</cfif> ></td>
<td align="left" valign="top">Flooring</td>
</tr>
<tr>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Handyman"> checked</cfif> ></td>
<td align="left" valign="top">Handyman</td>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Home Decorating"> checked</cfif> ></td>
<td align="left" valign="top">Home Decorating</td>
</tr>
<tr>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Home Inspection"> checked</cfif> ></td>
<td align="left" valign="top">Home Inspection<br /></td>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Landscape, Deck & Fences"> checked</cfif> ></td>
<td align="left" valign="top">Landscape, Deck & Fences</td>
</tr>
<tr>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Moving & Storage"> checked</cfif> ></td>
<td align="left" valign="top">Moving & Storage</td>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Plumbing, HAVC & Electrical"> checked</cfif>
<td align="left" valign="top">Plumbing, HAVC & Electrical</td>
</tr>
<tr>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Title & Escrow Services"> checked</cfif> ></td>
<td align="left" valign="top">Title & Escrow Services</td>
<td align="left" valign="top">
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
<cfif #quser.offered_work# EQ "Other Services (Pool, Home Security..)">
checked</cfif> ></td>
<td align="left" valign="top">Other Services (Pool, Home
Security..)<br /></td>
</tr>
</table></td>
</tr>
<tr align="left" valign="top" >
<td><cfinput type="hidden" name="active" value="0">
<cfinput type="hidden" name="user_type" value="6">
<cfinput type="hidden" name="ban" value="0"></td>
</tr>
<tr align="left" valign="top" >
<td><cfinput type="submit" name="seller_btn" class="buttn"
value="Submit"></td>
</tr>
</table>
</cfform>
What are you trying to do? What is the error message?
Here is the query for above form.
<cfquery name="quser" datasource="#DSN#">
SELECT contractor.year_experience, contractor.licensed,
contractor.offered_work, experiences.experience
FROM contractor LEFT OUTER JOIN experiences ON
contractor.year_experience=experiences.year_experi ence
WHERE email =<cfqueryparam value="#session.mm_username#"
cfsqltype="cf_sql_varchar" maxlength="150">
AND user_type=6
AND active=1
</cfquery>
hope someone out there has an answer
thanks
What are the values of dsn, and session.mm_username? If you hard code those
values, does the query play nicely?
Originally posted by: daypick
Here is the query for above form.
<cfquery name="quser" datasource="#DSN#">
SELECT contractor.year_experience, contractor.licensed,
contractor.offered_work, experiences.experience
FROM contractor LEFT OUTER JOIN experiences ON
contractor.year_experience=experiences.year_experi ence
WHERE email =<cfqueryparam value="#session.mm_username#"
cfsqltype="cf_sql_varchar" maxlength="150">
</cfquery>
hope someone out there has an answer
thanks
Can you post the error you're getting?
Originally posted by: daypick
error. said that "Invalid token 'C' found on line" which points to <cfinput
type="checkbox" name="offered_work" value="#quser.offered_work#" <cfif
quser.offered_work EQ "Additions & Remodeling"> checked</cfif> >
daypick,
I didn't read through all of your code, but afaik you cannot nest CF tags
inside each other in this manner:
<CFINPUT<CFIF ...>this causes an error</CFIF> >
Try using a regular <input> tag or moving the <cfif> tag outside of the
<cfinput> tag (see attached).
<!--- regular input field --->
<input type="checkbox" name="offered_work" value="#quser.offered_work#" <cfif
quser.offered_work EQ "Additions & Remodeling"> checked</cfif>>
<!--- move cfif outside --->
<cfif quser.offered_work EQ "Additions & Remodeling"> checked</cfif>
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#"
checked>
<cfelse>
<cfinput type="checkbox" name="offered_work" value="#quser.offered_work#">
</cfif>
Removed by Administrator
don't bother, I have solved the problem myself.
thanks for evrybody who trying to help
Bookmarks