Copied to clipboard

Flag this post as spam?

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


  • Dawn 13 posts 124 karma points
    Dec 01, 2016 @ 12:20
    Dawn
    1

    create controls dynamically based on parent field value

    Hi All,

    I need to create controls dynamically in products, based on the values of the specifications of category. specifications will be different for each category.

    For example, if Category 1's specifications are sp1, sp2 and Category 2's specifications are sp1, sp3, sp4; While creating a product under category 1, I need 2 fields sp1 and sp2 along with textboxes to enter values.

    Please help me.

  • Jonathan Richards 288 posts 1742 karma points MVP
    Dec 05, 2016 @ 15:59
    Jonathan Richards
    1

    Hi,

    To answer you question directly, without you rolling your own solution, then no, you can't get something that will meet your requirements as specified.

    There is another way to look at your problem, but it normally comes with a price. 1) That you don't understand what I write (That's on me, its a bit complicated and involves a few steps) and 2) explanation to content editors on how to use.

    So, step 1, create an area of content, not part of your webpages, to model your Category and Sp1, Sp2, hierarchy. Like

    Categories (alias categories)
    |
    |---- Category 1 (alias category)
    |       |
    |       |-----Category1 - sp1 (alias sp)
    |       |
    |       |-----Catgeory1 - sp2
    |
    |-----Category 2
    |       |
    |       |-----Catgeory2 - sp1
    |       |
    |       |-----Catgeory2 - sp3
    |       |
    |       |-----Catgeory2 - sp4
    

    Step 2, reduce the problem to a mntp and a text box inside a grid control that allows you too add as many entries as required. Where the mntp picker points to any sp content in the above tree. This should allow the content editor to pick any sp (which is always within a category) and then enter the text field, if/when he wants to add more sp, he just clicks the 'add' button that is part of the grid control.

    Step 3, explain to content editor that when they pick an sp, they have to choose all of them that are part of the parent category. This can be enforced by hooking into the event service and checking that the editor has completed them all - this is the only code you need to write

    Hope this helps

  • Dawn 13 posts 124 karma points
    Dec 06, 2016 @ 06:01
    Dawn
    0

    Hi Jonathan,

    Thank you for your reply.

    My main requirement is to list the parent category specification values in the child products(backoffice content section). MNTP control will not suit for it.

    Can you please help?

Please Sign in or register to post replies

Write your reply to:

Draft