Prevent Data Definition Drop Down from accepting 'Choose...'?

Greg Gomez's Avatar

Greg Gomez

01 Sep, 2015 09:14 PM

Hello:

I've have a drop down in a Data Defintion. It's required. By default it's first item is "Choose..." But when that item is selected, that's what gets stored. Is there anyway to prevent that?

<text type="dropdown" required="true" identifier="unit" label="Unit" help-text="Please select a Unit for this Person.">
    .
    .
    .
</text>

And then, in a transformed asset created from that Data Definition:

<div class="unit">Choose...</div>

Is there any way to force the user to choose something other than "Choose..."?

Thanks,
Greg

  1. 1 Posted by Ryan Griffith on 03 Sep, 2015 12:30 PM

    Ryan Griffith's Avatar

    Hi Greg,

    I was not able to reproduce this behavior in my local instance. Just to confirm, is one of your dropdown items literally Choose...? If so, you would need to remove that item, thus forcing the user to choose a value, since the field is required.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by Greg Gomez on 03 Sep, 2015 09:39 PM

    Greg Gomez's Avatar

    Hi, Ryan:

    Nope, not that I can see.

    Here's a snip from the Data Definition:

    <system-data-structure>
        <group identifier="basic" label="Basic Information">
            <text type="dropdown" identifier="unit" label="Unit" required="true" help-text="Please select a Unit for this Person.">
                <dropdown-item value="Course Development Group"/>
                <dropdown-item value="IT"/>
                <dropdown-item value="Strategic Initatives"/>
            </text>
        </group>
    

    From an Index of Assets created via the DD above:

    <system-page id="951ff53ec0a8508c5b026d9f3635a020">
            .
            .
            .
            <system-data-structure definition-path="For New Site/Staff">
                <basic>
                    <unit>Choose...</unit>
                </basic>
    

    I've also included a screenshot of the Dropdown as it appears at create/edit time, with 'Choose...' selected.

    Thanks!
    Greg

  3. 3 Posted by Ryan Griffith on 04 Sep, 2015 11:57 AM

    Ryan Griffith's Avatar

    Hm, very interesting, Greg. I am definitely not seeing the Choose... placeholder in my local 7.12.5 instance using a similar DD. What version of Cascade are you currently running?

    Thanks!

  4. 4 Posted by Greg Gomez on 04 Sep, 2015 07:55 PM

    Greg Gomez's Avatar

    Hey:

    Heh. 7.12.5.

    Let me know if you would like the complete DD.

    Thanks,
    Greg

  5. 5 Posted by nssabol on 04 Sep, 2015 07:59 PM

    nssabol's Avatar

    Hi All,

    For what it’s worth, we will have 7.14.2 starting tomorrow morning. Not sure if that makes any difference.

    Thank you and enjoy the holiday weekend,
    -Neil

  6. 6 Posted by Greg Gomez on 04 Sep, 2015 08:00 PM

    Greg Gomez's Avatar

    Hi, Neil:

    Hm. I'll take another look next week.

    Thanks!
    Greg

  7. 7 Posted by Ryan Griffith on 08 Sep, 2015 11:50 AM

    Ryan Griffith's Avatar

    Hi Greg,

    I believe I may have been able to reproduce the Choose... you are seeing.

    If you configure your dropdown with values/items (eg Yes and No) and enter Choose... into the Default Value field, you will see the dropdown pre-filled with Choose..., even though it is not a selectable option in the dropdown. When you have a moment, we can confirm this by editing that field and checking to see if Choose... is entered into the Default Value field.

    To resolve the issue you are seeing, your best bet would be to remove the Choose... from the Default Value field and save your Data Definition. Note: the value of Choose... will remain as the value in the structured data of the affected asset(s), so you will need to do one of the following:

    • Edit each asset and select a value (since it's a required field)
    • Temporarily make the field not required, edit each affected asset and select no value, and make the field required again when finished

    Please let me know if you have any questions.

    Thanks!

  8. 8 Posted by Greg Gomez on 09 Sep, 2015 04:54 PM

    Greg Gomez's Avatar

    Hi, Ryan:

    Heh, spot on. Good call.

    That was the issue.

    All cleared up now.

    Thanks so much!!
    Greg

  9. 9 Posted by Ryan Griffith on 09 Sep, 2015 05:04 PM

    Ryan Griffith's Avatar

    Thank you for following up, Greg, I am glad to hear removing the default value did the trick.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  10. Ryan Griffith closed this discussion on 09 Sep, 2015 05:04 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM