Form submission error on iPhone

Hi,

My app is built with Codeless and the native mobile app shell.

At some point, I have a button which triggers a form submission with this block :

image

On my desktop, everything works fine, whether in Chrome or Safari. When on Android, once again, everything is fine. However, when running on an iPhone, I get the following error exactly when the form submission takes place :

TypeError: pe.current.requestSubmit is not a function. (In 'pe.current.requestSubmit()', 'pe.current.requestSubmit' is undefined)

Cloud you please advise ? I was about to build and then this issue is blocking the whole process :cry:

Thanks for your help.

Hi again,

I loaded a previous version of my app, which used that exact same Codeless block. It submits.

But the same place now, with unchanged logic, does not submit anymore.

Did something change in the SDK ?

Hello @Nicolas_REMY,

Our dev is investigating this issue. Could you please provide more information?
What version of SDK do you use? When was the last working changes were made?

Regards,
Olha

Hi @olhadanylova ,

The version of SDK used is that provided by default for Codeless as of this morning. Upon checking, it says

Backendless UI-SDK for UI-Builder Applications.
 *  Version: 1.16.0
 *  Released: 2023-08-10T09:43:24.100Z

I checked and from what I can see, the last working version was built on Jul 17, 2023. Then it looks like the SDK changed and the feature seems broken on iPhone.

I have put together a test page.
My app ID = D7075715-5086-625A-FFAB-39C2F40FB200
default container, page name = form

Here are the results of the following logic :

when run on desktop :

when run on Safari on iPhone :

The On Submit Event clearly does not fire on iPhone.

Hello, @Nicolas_REMY.

Can you share with me your pubspec.yaml file?

Regards, Nikita

I have sent it to you via private message.

Please note, though, that the above example was made simply in the mobile Safari browser (not the app built with the native shell).

Ah, stop. Are you launching an app from an iPhone just using Safari?
The same error is reproduced when running through a native shell. Did I understand correctly?

My app is a “normal” app, built with the native shell. This is where I first noticed the issue.

To help narrow down where the issue comes from, and because I know that within the native shell, it really all is a webview, I figured I would try it with a simple website launched from Safari. So I built a test page.

If the issue disappears, then it has to do with the shell. But it’s not the case. The issue is still there on mobile Safari. So I believe it has to do with something in the SDK being incompatible with mobile Safari somewhere.

Thanks for the clarification. I just tried to reproduce your error in a clean application (using a shell). The problem did not reproduce.


image

Result:

I will pass this issue on to the UI-SDK development team.

Weird, because I also started from a blank page. They can try to see what is wrong in my app.

Quick question, though : on your button, did you set the behavior property to “Submit” or not ?
image

Mine was left to “Default”, NOT “Submit”.

Indeed, the aim is to be able to submit the form with any action, like clicking on an icon, and not only a button which submits. This was the subject of this ticket : How can I launch form submission when clicking on an icon?

I set “Default”

1 Like

Thanks.

This all makes me even more curious to understand what is going wrong. It looks like it’s only on my app and/or my device, which is better. But I’d be grateful for a solution because for the time being it’s broken.

Your app is running in the cloud backendless or do you have Pro/Managed installation?

It’s a standard cloud app, on the EU cluster.
My app ID is D7075715-5086-625A-FFAB-39C2F40FB200.

Works fine with iOS 16.6. Which version do you have?

OK, so the plot thickens :

  • in Safari mobile on iOS 16.6 : :white_check_mark:
  • in Safari mobile on iOS 15.7.8 : :x:
  • in native mobile app shell on iOS 16.6 : :x:
  • in native mobile app shell on iOS 15.7.8 : :x:

And just as as reminder, when I reinstall my older app (using native mobile app shell) built before July 17 : :white_check_mark:

Hi,

Do you have any news regarding this issue ?
I am waiting eagerly for a resolution because it blocks the build of my new version.

Thanks.

Yes, the problem is located in support of requestSubmit in safari. As you can see - it starts from v16.

I’ve created an internal ticket and what’s more important is the fix is already done, but it takes time to release.

As a temporary workaround, I could offer you to not use this block, and maintain submit by your hands.

Thank you for reporting the issue and for your patience, we much appreciate it.

Regards, Dima.

Hi @Dima , thanks for the reply.

I can’t really not use it, because it’s one icon submitting a different form according to which tab is displayed. So it’s not a simple button submitting only one form.

Good to know it’s in the pipes, though. Do you know if it will be released before the end of the week ?