What type of work do you do ? [/ref]
checked > Additions & Remodeling checked > Appraisers & Attorney
checked > Appliances checked > Builder
checked > Cleaning Services checked > Flooring
checked > Handyman checked > Home Decorating
checked > Home Inspection
checked > Landscape, Deck & Fences
checked > Moving & Storage checked[ref] >Plumbing, HAVC & Electrical
checked > Title & Escrow Services checked > Other Services (Pool, Home Security..)
[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => daypick [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> checked> checked [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => mxstu [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 6 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> updating list, radio and checkbox - Coldfusion - Advanced Techniques

updating list, radio and checkbox - Coldfusion - Advanced Techniques

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 ...

Sponsored Links
  1. #1

    Default updating list, radio and checkbox

    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 &amp;
    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 &amp;
    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 &amp; 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 &amp; 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 &amp; 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 &amp; 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>

    Sponsored Links
    daypick Guest

  2. #2

    Default Re: updating list, radio and checkbox

    What are you trying to do? What is the error message?
    sdsinc_pmascari Guest

  3. #3

    Default Re: updating list, radio and checkbox

    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

    daypick Guest

  4. #4

    Default Re: updating list, radio and checkbox

    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



    Dan Guest

  5. #5

    Default Re: updating list, radio and checkbox

    Can you post the error you're getting?
    sdsinc_pmascari Guest

  6. #6

    Default Re: updating list, radio and checkbox

    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>

    mxstu Guest

  7. Moderated Post

    Default Re: updating list, radio and checkbox

    Removed by Administrator
    daypick Guest
    Moderated Post

  8. #8

    Default Re: updating list, radio and checkbox

    don't bother, I have solved the problem myself.
    thanks for evrybody who trying to help

    daypick Guest

Similar Threads

  1. Radio Button & List to search - ASP
    By Tag2007 in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: July 27th, 11:01 AM
  2. display and updating multipal checkbox, list and radio
    By daypick in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: November 10th, 11:36 AM
  3. Updating my checkbox
    By Ancient in forum Macromedia ColdFusion
    Replies: 2
    Last Post: August 5th, 09:05 PM
  4. Replies: 5
    Last Post: July 27th, 04:11 AM
  5. Updating an Access DB Yes/No field with a Checkbox value
    By Harry Devine in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: June 28th, 04:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •