Forum Academy Marketplace Showcase Pricing Features

How to grab the value of in an input field. The value is added with Javascript

I have a hidden field that I add randomly generated text into using Javascript…

Please can someone help me with how to grab this input field’s value in a Workflow.

I tried and Bubble sees it as blank.

Thanks

Hi there, @Buddha… can you share a screenshot of the input element’s Appearance tab?

Best…
Mike

Hi Mike

Here it is…

How are you adding the randomly generated text into that element? I wondered if you had an expression in the Placeholder field that needed to be in the Initial content field instead, but all you have is an empty input.

I am using this piece of Javascript code…

document.getElementById("fpjstext").value = result.visitorId

result.visitorId is a value generated when the user loads the page.

I’m not sure what the input element has to do with anything here, but after result.visitorId is generated, can you set a custom state to the generated value and have the Initial content field of the input element set to the custom state?

2 Likes

Hi Mike,

Please never mind. I found a plugin that this.

Thanks.