Hidden Fields Populated not appearing Webhooks

Hello!

I’ve added a hidden field (named ‘bid’) to a form, and I’m populating with JavaScript:

Feathery.init(‘ID’)
Feathery.renderAt(‘form-container’, { formName: “FORM_NAME” });
Feathery.setFieldValues({bid: “value”});

When I check it in the console (before submitting), I see the value in there using this line:

console.log(Feathery.getFieldValues());

However, I don’t see the value in my responses, nor in my webook that I attached.

Can you link to the form where you’ve added this logic that isn’t working for you?

You can check it out here: https://pets.rockpapersitecore.com

It seems you’re calling it a little too early. I recommend you call the function as part of the onLoad event handler (onLoad() - Feathery Docs)

Adding the field setting to onLoad totally fixed this. Thanks!