How to conditionally embed an own internal widget with parameters in an html snippet?

How to conditionally embed an own internal widget with parameters in an html snippet?

Hello everyone,

I'm trying to create a dynamic view in a page using an HTML snippet. The goal is to display different content based on a URL parameter (input.step).

I have successfully managed to conditionally display different forms using the following logic, and it works perfectly:

  1. <%{%>
  2. <div>
  3. <%
  4. rid = ifnull(input.recordID,"");
  5. step_param = ifnull(input.step,"intake");
  6. // 
  7. if(step_param == "intake")
  8. {
  9. %>
  10. <div elName='zc-component' formLinkName='Offer_Setup_Intake' params='zc_Header=false&amp;zc_SuccMsg=Data Added Successfully!&amp;zc_SubmitVal=Submit&amp;zc_ResetVal=Reset'>Loading Form...</div>
  11. <%
  12. }
  13. else if(step_param == "review")
  14. {
  15. %>
  16. <div elName='zc-component' formLinkName='Offer_Setup_Review_Approve' params='zc_Header=false&amp;zc_SuccMsg=Data Added Successfully!&amp;zc_SubmitVal=Submit&amp;zc_ResetVal=Reset'>Loading Form...</div>
  17. <%
  18. }
  19. %>
  20. </div>
  21. <%}%>


Now, I need to add another condition. If input.step is "X", I want to display an internal Zoho Creator widget. This widget requires several parameters to be passed to it.
My question is: What is the correct way to generate the src URL for an internal widget and pass its parameters from within a Deluge script in an HTML snippet?