Customize the form embed code - make a field required

Hi
I have a hubspot form I would like to use in an a/b test.

We want to test a particular field (phone number) being optional and required. The form currently has it set to optional but I need to use the same form in the a/b test and set the phone number field to required.
Can this be done by adding some code within

hbspt.forms.create({
 translations: {
 en: {}
 }
})

Essentially I just want to target the phone number field, make it required and add a validation message to it.
Does anyone know if this is possible?
Thanks
Jools

Hi
I have a hubspot form I would like to use in an a/b test.

We want to test a particular field (phone number) being optional and required. The form currently has it set to optional but I need to use the same form in the a/b test and set the phone number field to required.
Can this be done by adding some code within

hbspt.forms.create({
 translations: {
 en: {}
 }
})

Essentially I just want to target the phone number field, make it required and add a validation message to it.
Does anyone know if this is possible?
Thanks
Jools

Hey there! I am merging this with your post from yesterday. Please refrain from creating duplicate posts for the same topic. Thank you! — Jaycee

Hi, @Jools619, thanks for reaching out. I’ll invite some of our community members to the converstaion — hey @Kevin-C @assi @miljkovicmisa, do you have any thoughts on workarounds?

Thank you very much for taking a look! — Jaycee