Elements Beta and form problems (SOLVED)

Could the problem be caused by the site being password protected?

my forms are on a password protected page…

Hi @mrTablet

I was having trouble getting my form to work. So I tried something simple just to see if it was something in the form itself. I set up another form using one of the form templates. Very simple just one field. I used the one in blue and the setup the smtp settings and it worked.

It may be worth a try.

@mrTablet I’m also wrestling with a new simple form. My experience is similar to your response from one.com. I’m digging in with Javascript Console, and Postman proxy (intercepts http traffic), and a POST request is not being sent. Still digging, and will update

@differentdan is your man for forms but read this also Help setting up Form Settings in Elements - RESOLVED - #2 by Fuellemann

@mrTablet OK. There is a bug. Not sure it is yours. My trigger probably is a special character (comma or ampersand) in the label of a checkbox. Trigger, Not fully isolated.

Have reproducible case. I’ll try and figure out the best way to submit a report. Looks like email to support.

The Elements implementation is probably a modern way as they POST form data via JSON to a php handler, thus no email login info is embedded in the web page. BTW, I’m a web lightweight, so this may not be fully accurate.

The issue is on the browser side, as when the trigger condition exists, the POST with JSON is not sent. If I remove the checkbox set, the POST is sent. I’ve reproduced this failure in Vivaldi as well.

I’d suggest building the form up again, progressively with simple elements first.

BTW, when I removed the Checkbox item from the form, the email went out as expected. In your case, you might try selectively removing items as an alternative to building up.

And, again this may not be your issue. I’d bring up the Javascript Console, load your form and submit. The image below is what the POST looks like in the console

Now I have tried everything but I’m not getting anywhere. The server is running PHP 8.4.
I’m also disappointed, @dan @ben, that no one from Realmac Software on the forum seems interested in helping with this issue.

Here are my settings and what I can find at One.com.

One.com:

My settings:

I can’t see any errors here!?

I have done that. No fix.

This might be a left field fix, but, if you are able to establish other email addresses, try creating one that doesn’t have a hyphen, at least to test, to rule out the hyphen in the email address being a problem.

I have tried post@syklubben.no but get same result.

Can’t find Checkbox in my form.

Hi @mrTablet

I’m just spitballing here. I’m not familiar with one.com, I have custom domains set up with Apple and I know I can’t use any of my custom domains as the Username. It has to be the primary account email or it fails. Not sure if it’s the same with one.com.

It is primary domain.

@dan Which latest version of phpmailer does Elements Beta use?

@mrTablet

I’d suggest you take a look at the Javascript console. It will really partition the problem. Was the form sent or not?

The console will clearly show the formObject and contents sent. See image above.

If sent: focus is on server.
IF not: trigger is in browser

I’m not suggesting this bug is yours, but in any case, this is a simple and cheap test, that will reduce the search space.

The problem lies in how the data is packaged before being sent.

Even though you have now enabled “Required,” your log still shows: Submit data ▶ FormData {}. This means your JavaScript function (handleSubmit) is firing off a request, but it’s failing to retrieve the text you entered in the email field. The server sees an empty submission and responds immediately with a 400 Bad Request.

What is wrong?
Since you are using Alpine.js (as seen in the log), it is usually one of these two things:

  1. Missing x-model: Your input field in the HTML code is likely missing a link to your Alpine data. It should look something like this in the code: <input x-model="email" name="email" type="email">
  2. FormData object not populating: The log shows that FormData is completely empty {}. This happens if the code tries to read from a form it doesn’t have access to, or if the input fields are missing a correct name attribute that Alpine/JavaScript recognizes.

Hi @mrTablet

Can you try testing using your root folder website?

I see that you are using a subfolder for your documents called “ny“ I believe this is the reason why you are having issues.

I add the same issue using a subfolder, once I change it to the root folder, everything worked fine.

Best

@weaver Unfortunately, I cannot do that. The old site built in Classic is located there, and the Elements files are under /ny. Maybe that’s the problem?

You asked initially without putting any @ for help and people have tried to help you. There are numerous posts about forms not working of which most are resolved. I seet you a link and said @differentdan dan is your man as he is the one who has first hand experience in resolving theses issues. Be patient someone will come and help you.