Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

How to add div tag or new row in create case form before subject

(0) ShareShare
ReportReport
Posted on by 25

Hi Team,

How to add div tag or new row in create case form before the subject. Please find the marked area.  The purpose of this we need to show the description based on the subject dropdown list selection values 

For example: If we select a subject from the dropdown as accounting then we need to so the description about the accounting in the above area.

Can you help me how to achieve this one in case the creation form?

Please find the screenshot.

pastedimage1604578576622v2.png

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to add div tag or new row in create case form before subject

    Hi Partner,

    Has the problem been solved? Any updates?

    Please click Yes under "Did this answer your question?" to close this thread.

    pastedimage1604890915347v1.png

    Thanks. 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to add div tag or new row in create case form before subject

    Hi partner,

    It is difficult to create a dynamic div tag it in portal, but you can create a new field to show description based on subject value with the help of javascript.

    Here are steps.

    1.Go Settings > Customization > Customize the system> Entities > Case.

    Create a new field named description and add it to the Web-Create Case form.

    2.Write js code.

    (1) Get subject value id.

    The subject field is special, it shows name in the form but it store guid to database.

    You can write following code in js, when you select one subject, it will open a dialog to provide if of it.

    alert($("#subjectid").val());

    pastedimage1604653688980v1.png

    (2) Add js code to the create case form of portal.

    Select subject and click Edit button.

    pastedimage1604653723606v2.png

    It will open one dialog and switch to Options tab and add js code.

    pastedimage1604653787241v3.png

    $(document).ready(function () {
    	console.log("ready!");
    	$("#subjectid").change(function () {
    		alert($("#subjectid").val());
    		if ($("#subjectid").val() === "07c04ad1-d4e9-ea11-a817-000d3a1c5d97") {
    			$("#new_description").val("test successfully");
    		} 
    	});
    });

    Save and refresh page to test.

    pastedimage1604653845321v4.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans