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:
- <%{%>
- <div>
- <%
- rid = ifnull(input.recordID,"");
- step_param = ifnull(input.step,"intake");
- //
- if(step_param == "intake")
- {
- %>
- <div elName='zc-component' formLinkName='Offer_Setup_Intake' params='zc_Header=false&zc_SuccMsg=Data Added Successfully!&zc_SubmitVal=Submit&zc_ResetVal=Reset'>Loading Form...</div>
- <%
- }
- else if(step_param == "review")
- {
- %>
- <div elName='zc-component' formLinkName='Offer_Setup_Review_Approve' params='zc_Header=false&zc_SuccMsg=Data Added Successfully!&zc_SubmitVal=Submit&zc_ResetVal=Reset'>Loading Form...</div>
- <%
- }
- %>
- </div>
- <%}%>
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?