Form Designer: How to add an editable link tool

The objective is to allow a web form user to type a URL and save the corresponding link in a clickable format.

Step 1: Create a custom link tool

This step must be performed by a WorkflowGen Administrator.

  1. Create a text file “ASPlink.txt” with the following content:

    <div class="Field" id="_ROW">
        <div class="FieldCaption">
            <label class="FieldCaptionLabel" for="_LINK">Link:</label>
        </div>
        <div class="FieldValue">
            <asp:HyperLink class="FieldValueInput" id="_LINK" runat="server" NavigateUrl="http://www.yourwebsite.com" Target="_blank">Click here</asp:HyperLink>
        </div>
    </div>
    
  2. Save the file in \wfgen\App_Data\Templates\Forms\En\Custom folder (change the language En if needed):.

Step 2: Add two fields in the web form

  1. In the Form Designer, add a textbox (with the ID URL) and a new ASPlink (with the ID: LINK1).

  2. Edit the ASPlink custom attributes. For the NavigateUrl attribute, enter the following code:

    <%# DataBinder.Eval(FormData, "Tables[Table1].DefaultView.[0].REQUEST_URL") %>
    

    Here, REQUEST_URL is the field ID of the textbox that contains the URL.