I have a question regarding grabbing content from an e-mail form before/while it submits.
I am using the code
<script>
$('#nm_mc_form_id-1352905826').submit(function(e){
// Grab the email address from the form
var email = $('#EMAIL-1352905826').val();
});
</script>
As you can see the from id and the email id are dynamic. Is there any way to grab the ID’s based on their prefix?
I did see in another SO (yes I have looked around ;)) something along the lines of:
$('#id').find('p')
Just not sure how that works or if it’s what I need?
I am one of those guys who likes to learn so please provide a little insight as to what your recommendation is.
Cheers!
Use wild card
^ is used for element starting with given string.