```", "answerCount": 1, "upvoteCount": 0, "datePublished": "2023-09-22T14:42:00.000Z", "author": { "@type": "Person", "name": "Robert Wynter", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000AKb8RAAT", "affiliation": { "@type": "Organization", "name": "Durham College Applied Arts & Technology" } }, "acceptedAnswer": { "@type": "Answer", "text": "got it to work with $(\".primaryAction\").click();", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007JDKw7SAH", "datePublished": "2023-09-22T19:15:09.000Z", "author": { "@type": "Person", "name": "Robert Wynter", "url": "https://trailblazers.salesforce.com/profileView?u=0053000000AKb8RAAT", "affiliation": { "@type": "Organization", "name": "Durham College Applied Arts & Technology" } } }, "suggestedAnswer": [] } }
Skip to main content

trying to get formassembly to auto submit when tpye preifll type is Open House. Any suggestions

```javascript<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script><script>//waits until the document loads to execute script$(document).ready(function() {var typeOH = document.getElementById('tfa_18');//alert('Thank you for attending '+ typeOH.value); // alert(typeOH.value == "Open House");if((typeOH.value == 'Open House') == true) {   // auto submit if it equals "Open House"  alert('Thank you for attending');   document.getElementById("tfa_0").submit();}});</script>```
1 answer
0/9000