Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Do multiple fake submit buttons need multiple "RealEmail" buttons to function?

Avatar

Former Community Member

Hello,

I have a form that incorporates many forms into 1 and based on a selection made in a dropdown, certain fields are visible. So, I have created a seperate submit button for each of the forms, but the problem is that it isn't submitting when clicked. I have 6 submit buttons, but only 1 RealEmail button. can all 6 fake email buttons reference the same RealEmail button, or does there have to be 6 individually named RealEmail buttons for the form to submit? Here is the code that I am using for the Fake email buttons (the only variation in the code is a different email address on each of the buttons):

if

(CSRFirstName.rawValue != null){

RealEmail.event__click.submit.target

="mailto:" + "someone@somewhere.com" + "?subject=Some Subject" +PaxName.rawValue +

" Order#" + Order.rawValue;

RealEmail.execEvent("click");

}

else {

app.alert("Please enter your first and last name!");

}

Thanks in advance for any insight into this problem...

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

No you only need one real email button but you will have to reference the full path to the object instead of just its name.

Paul

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

No you only need one real email button but you will have to reference the full path to the object instead of just its name.

Paul

Avatar

Former Community Member

OK I got it. This is the first form that I am using sub forms on, and I didn't put the sub form name in the field name when pulling for the subject line, so the submit button wasn't working. Thanks for the pointer, it made me think about it and when I added the subform field name, it worked.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----