I have an input field that looks like this:
I was trying to change
You need to use attribute equals selector [name="value"]
Also from the docs:
To use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \\
So you can do:
jQuery('input[name="submitted\\[event_email\\]"]').val('test');
But actually you don't need to escape the [ ]
here since it's wrapping in quotes:
jQuery('[name="submitted[event_email]"]').val('test');