Use code to interact with a contact form

I would like to add text to a field inside a contact form. I didn’t see any built-in option to do that so I enabled code. I didn’t find any way to do it with code also. The only way I found is to remove the contact form and to draw user-input fields that will look like a form and then program the entire “send” function.
So my question is how to manipulate fields’ text that are part of a contact form. I am lookinf for somthing like that:

$w('#contactForm1').getField('field1').value = 'something';

Hi,

To prefill a value, use the following code:

$w.onReady(function () {
	$w('#input1').value = 'prefilled value';
	$w('#input2').value = 'other prefilled value';
	
});

Thank you Ido for the response. However I think I probably did not explain the problem good enough.
#contactForm1 is a Contact Form , not a regular User Input element. a Contact Form has fields which are not accessible to code (as far as I saw in the API). Also a Contact Form does not have the property “value”.
Does what I say make sense? Or maybe I didn’t understand it?

Hi Alon,

Indeed the normal contact form has no integration with wix code.
You can easily create your own custom form.
See the tutorial here

Once you are done setting up the form make sure to add the code from my previous reply to prefill the values according to your requirements.

Good luck