Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • bhagirath pancholi 19 posts 88 karma points
    Jan 01, 2018 @ 13:03
    bhagirath pancholi
    0

    Show Hide fields based on radio button or drop down selection in back-end

    Hello Developers,

    I have some requirement in Umbraco back-end side. Actually, I have multiple designs for Banner sections of a page so I have created radio button with available options of banners type and Archetype for fields.

    In Archetype, i have taken all the fields which are necessary for all options in that scenario now if in some options fields which are not needed then also that's displayed which create confusions for the person who handle CMS and doing data entry in that.

    What I want like if I have selected option in Radio button like Image Only then all other fields in archetype like Title, Left Section Text, Right Section Text, Button Text will be disabled or hide and show only related field like Background Image (Media Picker). I have attached image also for more clarity.

    check This images

  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Jan 01, 2018 @ 15:21
    Matthew Wise
    0

    You would need to create something custom.

    An alternative would be have the user select from a list of archetypes within the banner picker

    Matt

  • bhagirath pancholi 19 posts 88 karma points
    Jan 02, 2018 @ 09:35
    bhagirath pancholi
    0

    In the alternative way that you suggest,that is also not feasible . i agree with you that we must create something custom here. i don't how to create custom this thing. can you/anyone guide me or share reference URL from which i can get the knowledge.

  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Jan 02, 2018 @ 09:40
    Matthew Wise
    0

    You could take a look at how to create a custom property editor.

    https://our.umbraco.org/documentation/Extending/Property-Editors/

    There are ways to use other data types within your own using the dataTypeResource You could then create an archetype for each banner type and load them on radio change I think.

  • bhagirath pancholi 19 posts 88 karma points
    Jan 02, 2018 @ 13:59
    bhagirath pancholi
    0

    i tried other solutions but below are some confusions can you please help me to solve that out.

    enter image description here

    I followed the same steps mentioned here https://github.com/uComponents/nuPickers/wiki/Custom-Labels , you can see in below images enter image description here

    1) Options XPath = //My-Media-Type what is My-Media-Type and where it will be used?

    2) for data source option third step macro code why we have used "Profile Picture" as we didn't give this alias anywhere while defining macro parameters

    enter image description here

    enter image description here

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft