• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFSELECT QUESTION

Participant ,
Nov 21, 2022 Nov 21, 2022

Copy link to clipboard

Copied

When using htmal select tag I can show a message on the first option attribute to the user, such as: Please select a country :

<fieldset>
<select name="Countries" class="stylebox" id="Country" required>
     <option value="">Select your Country</option>   
    <CFOUTPUT QUERY="GetCountries">
    <option value="#GetCountries.country#">#GetCountries.country#</option>
    </CFOUTPUT>
</select>
</fieldset>

 

Is it possible to do the same thing with cfselect and how? I put down my message in the message attribute of cfselect but it doesn't work. Here is my code:

<fieldset>
<cfselect name="Countries" query="GetCountries" value="Country" required="True" multiple="No" size="1" class="stylebox" ></cfselect>
</fieldset>

 

Views

191

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Nov 21, 2022 Nov 21, 2022

Votes

Translate

Translate
Participant ,
Nov 21, 2022 Nov 21, 2022

Copy link to clipboard

Copied

I tried adding 

<cfselect name="Countries" query="GetCountries" value="Country" required="True" multiple="No" size="1" class="stylebox" >

    <option value = "">Select your country</option>

</cfselect>

 

It works but this appear on the bottom most of the list where user don't see it immediately. How to get this option listed on top. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 21, 2022 Nov 21, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2022 Nov 22, 2022

Copy link to clipboard

Copied

LATEST

Let me confirm the answer, to assist anyone who comes here with the same question. Just add the cfselect attribute,  

queryPosition="below"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation