Skip to main content
Open

Url Parameter for pre-selecting Conversation as new Topic Type

  • February 26, 2025
  • 3 replies
  • 36 views

DannyPancratz
Forum|alt.badge.img+9

community.yourdomain.com/topic/new?type=idea but a parameter that works for the conversation/discussion topic type. 

3 replies

DannyPancratz
Forum|alt.badge.img+9
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • February 26, 2025

If this was built, it could be a workaround for this more complex idea: 

 

You could add a third party script to redirect the Create Topic button to the URL parameter that has discussion pre-selected. 

 

Other posts with related interest:

 


  • Gainsight Employee ⭐️
  • March 3, 2025
New IdeaOpen

jvdc
  • Helper ⭐️⭐️⭐️
  • February 19, 2026

Still hoping the “discussion” URL parameter makes it into dev :-)

In the meantime I am using this script which does the job

 

!--scriptorstartfragment-->

// Preselect Discussion ONLY when ?type=discussion is in the URL

(function () {

  const params = new URLSearchParams(location.search);

  if (params.get("type") !== "discussion") return;

 

  const trySelect = () => {

    const input = document.querySelector('#topic_content_type_discussion');

    const label = document.querySelector('#topic-discussion-label');

    if (!input || !label) return false;

 

    input.checked = true;

    document.querySelectorAll('.radio-box-button').forEach(l => l.classList.remove('is-active'));

    label.classList.add('is-active');

    return true;

  };

 

  const interval = setInterval(() => { if (trySelect()) clearInterval(interval); }, 200);

  setTimeout(() => clearInterval(interval), 5000);

})();!--scriptorendfragment-->