Retrieve Values from HTML in New Form Designer

Hello - I am currently using an HTML block in the form designer to allow the user to select a file. However, when trying to get the path they selected nothing is being returned. How can I return the path?



image

@iamtal

Your key shpuld be vendorfilepath

And use get form values to get the values after show form

Cheers

I did this, the out_vendorFilePath is blank even with the correct key there.

@iamtal

You used get form values as well?

Cheers

Yes I get a ‘FormNotFound’ error even though I have the instance name in both activities

@iamtal Did you find a way to retrieve values using HTML element component on UiPath Form Designer for Action Center?

Hi @Kirbymisa ,

Could you please share:

  • UiPath version and components you have available

Meanwhile know that UiPath’s Forms activities, when rendered as HTML, do not natively capture file input values back to workflow variables, even if the field key matches and you use “Get Form Values.” The value is always blank or null for file inputs.

Recommended Steps for UiPath Forms Workflow

  1. Use the UiPath “Browse for File” activity BEFORE showing the form
  • This activity opens a standard Windows dialog for the user to pick a file.
  • The selected file path is then saved into a workflow variable.
  1. Pass the file path variable INTO your Form as a text field value
  • You can display this path in a text field or label on the Form, so the user can confirm or edit it.
  • But DO NOT try to gather it via a custom HTML input field.
  1. Do not expect HTML file inputs in your Form to populate form values
  • They are not supported for file transfer or path return for workflow security reasons.
  1. If available, use the native “File/Folder Path” form component
  • Check your UiPath studio (enterprise\Community) version some newer UiPath Form Activities come with this component which can return a file path on submission. Use this if your installation includes it.

What to do next?

  • If you follow these steps, it WILL resolve the issue of not receiving a file path value in your workflow. You will no longer get a blank value or FormNotFound error, because the path is obtained outside the form and handed in as a variable, not via HTML.

After trying please let know the result(Hopefully it should resolve your issue.).

Good day!

@Tapas_Kumar_Pattnaik

UiPath Version: 2023.10.13
Create Form Task
Wait for Form Task and Resume

Thanks for your response! Just to clarify, we’re not dealing with file input. We’re using the HTML Element in UiPath Form Designer to build a custom-designed form instead of using native form components.

In our case, we’ve added a <select> dropdown inside the HTML Element. When a user selects a value in UiPath Action Center and submits the form, we want to capture the selected value and pass it back to the UiPath workflow as an output variable (out_Department).

We’re using a custom JavaScript function with FormContext.setFormVariable() to set that value on submit. However, even though a value is selected, the output returned to the workflow is still empty only returned output is submit = true

We’re trying to figure out the proper way to pass values from custom HTML inputs back to the workflow. Any guidance on how to make this work would be appreciated.

This is only simple custom example just to test only.



image

This is the problem. You shouldn’t be doing this because, as you’ve found out, there’s no way to get the values back out.

Thanks, that makes sense. I didn’t realize the HTML Element in Action Center forms is just for display. I was using a custom <select> inside it and trying to send the value back to the workflow using FormContext.setFormVariable().

I thought it would work like in standalone custom forms, but yeah, looks like that approach doesn’t apply here.

Appreciate the response. I’ll switch to using the built-in dropdown instead.