activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

工作流活动

上次更新日期 2026年2月17日

动态 HTML 元素

动态 HTML 元素使您能够创建可在运行时打开表单时在表单的任何部分中动态显示或使用的 HTML 内容。 例如,您可以指定在选择下拉选项后动态显示图像,然后提示用户在文本字段中输入图像项目。

教程

要传递动态 HTML 元素,请执行以下操作:

  1. From the Create Form activity > Properties panel, open the FormFieldsCollection window.
  2. Add an In argument of type String and name it suggestively.
  3. Open the Form Designer and drag an HTML Element component to your form.
  4. In the Display tab > HTML Tag field, add p for a new HTML paragraph.
  5. In the Content field, add the type of data that you want to pass dynamically by using the expression {{data.variable}}, and replace variable with the name of the argument created at Step 2.
  6. Select the Refresh on Change checkbox.
    备注:

    To add an image in an HTML Element form field, the image has to be converted to Base64 format.

要将图像作为动态 HTML 元素传递:

  1. 将图像转换为 Base64 字符串。
  2. 将 Base64 字符串另存为工作流变量。 例如image
  3. From the Create Form activity > Properties panel, open the FormFieldsCollection window.
  4. Add an In argument of type String and name it sampleImage.
  5. Set the Base64 string from Step 2 as Value.
  6. Click OK to close the FormFieldsCollection window.
  7. In the Form Designer > Advanced tab > HTML Element component > Content field , enter the following expression:
    <img href={{data.sampleImage}} height=100 width=100/>
    <img href={{data.sampleImage}} height=100 width=100/>
    
    备注:

    The Label/Header basic components can also be used to pass elements dynamically. This enables you to set dynamic labels and headers for form fields.

  • 教程

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2026 UiPath。保留所有权利。