Forum Discussion

Sunil_GA's avatar
12 years ago

Need help with implementing Drop Down Menu in Post message

Hi All,

 

I would like to implement Drop down menu in Post message window. while posting new message or replying to the message users can provide the product and other system details by selecting from drop down menu. The data selected from the drop down menu should be included with users message after posting the message. 

 

want to know what resources are required and how can it be implemented with existing lithium APIs

 

something like this ,

screen shots:

 

New00.jpg

 

Above image is a new message which give drop down options to user to include data with his message.

 

New01.jpg

After posting Message, user selected data should be included within message body.]

 

 

Any help would be appreciated.

 

Thanks,

Sunil

 

1 Reply

  • AdamN's avatar
    AdamN
    Khoros Oracle
    12 years ago

    There may be ways of doing this through Studio, but I can't say that I would necessarily recommend it as the approach doesn't use established customization contract points and would be prone to breaking with upgrade. The best way of doing this would require customization of the message editor form and the addition of custom message metadata, both of which would need to be done by Lithium Professional Services. Storing the values in metadata would have other benefits as well such as being able to search/filter by specific metadata values via the REST API. If you'd like to get this scoped out by the Professional Services team, please file a case via the customer case portal.

     

    If you do want to try to tackle this yourself, the high-level approach might look something like this:

    1. Add a custom component to the post page that displays the drop down menus. You're likely going to run into issues getting the exact placement as shown in your image as the message body editor is a single block.
    2. Add some JavaScript to capture the form submission event and prevent the default action.
    3. Grab the content from the custom drop down menus you added, format it, and append to the message body value.
    4. Submit the form with the updated value

    Again, I would advise against this approach. If you decide to move forward, I would strongly encourage you to thoroughly test it with each upgrade the community receives.

     

    I hope this helps!