Wrong include on module project with data bindings

Hi, this is very helpful and I have worked through this to create a login form for my app and connect to my web project, however when I try to set the globals in the server actions, I try to link to the login page in my mobile app, it shows an empty list for the form fields and get the message “no form field found for synchronization” when I try to import the field from the form. What may I have missed or done wrong here?

Hello,
Are you sure your form has a name and id assigned?

yes it has an ID assigned.

And what about a name?

ok, not sure where it is named but under app structure shows alongside form what I thought was the name which is same as ID. However I have found under the DOM in the form inspector a name field, so I have given the form a name there, but I still have the same result.

Please paste your form code here, whrapped in 3 backticks: ```

Thanks, here it is…

  <body is="dmx-app" id="">
    <div class="container">
      <dmx-serverconnect id="serverconnect1" url="http://localhost/connect/dmxConnect/api/Security/login.php" site="connect"></dmx-serverconnect>
      <form id="fed_login" is="dmx-serverconnect-form" action="http://localhost/connect/dmxConnect/api/Security/login.php" site="connect" method="post">
        <div class="row align-items-start mt-5">
          <div class="col-12 col-md-8 col-lg-7 text-left align-self-center border rounded-sm border-primary col-xl-6 offset-xl-3 offset-md-2">
            <div class="row">
              <div class="col">
                <h1>Log In</h1>
                <p class="text-h3">Enter your details below.</p>
              </div>
            </div>
            <div class="row">
              <div class="col mt-4">
                <input type="text" id="inp_email" name="email" class="form-control" placeholder="Enter Email Address" autocomplete="off" autofocus="true" tabindex="1" required="">
              </div>
            </div>
            <div class="row mt-4">
              <div class="col">
                <input type="password" id="inp_password" name="password" class="form-control mb-3" placeholder="Enter Password" autocomplete="off" tabindex="2" required="">
              </div>
            </div>
            <div class="row ml-n1">
              <div class="form-check">
                <input class="form-check-input" type="checkbox" value="1" id="remember" name="remember" checked="true" tabindex="3">
                <label class="form-check-label" for="remember">Keep Logged In</label>
              </div>
            </div>
            <div class="alert" id="alert1" is="dmx-bs4-alert" role="alert">
              <p>This is a nice alert!</p>
            </div>
            <div class="row mt-4">
              <div class="col">
                <button class="btn bg-primary text-light mb-2 w-25" type="submit" tabindex="4">Login</button>
              </div>
            </div>
          </div>
        </div>
      </form>```

Please use backticks, not single or double quotes for wrapping code.

backtick: `
single quote: ’
double quote: "

Oops, sorry. I have edited my last…

Thanks

Well your form does not have a name assigned, I don’t see a name attribute there:

<form id="fed_login" is="dmx-serverconnect-form" action="http://localhost/connect/dmxConnect/api/Security/login.php" site="connect" method="post">

Please make sure to add a name to it.

Hi,
Thanks, I have done that but still have the same issue.

<form id="fed_login" name="fedform" is="dmx-serverconnect-form" action="http://localhost/connect/dmxConnect/api/Security/login.php" site="connect" method="post">

I wonder if your actions being on localhost is causing the issues?

Can you post a screenshot of what is selected in the GLOBALS, where you are supposed to import the form and also a screenshot of the exact error message, that appears?



The linked page for the form is file:///C:/xampp/htdocs/FANZP_Conn%202019/www/login2.php
As you can see the page when opened in the web site shows the form as blank, yet when opened in the app it looks ok.
Appreciate you looking at this for me, thanks!

Thanks, I had been wondering that myself and looking at changing it to work of the web server.

But there’s something wrong in your site configuration, as the link should not start with file://

file:///C:/xampp/htdocs/FANZP_Conn%202019/www/login2.php

Maybe, but that is how it loaded when I used the folder icon to find the file to link to, if I remove the file:/// it gives an error, “file does not exist”

You are just having a wrong path.

How did you create the page on first place?
Seems like you are editing a page that is outside of your current project folder.

Please make sure you are always working with files within your project.

So try recreating the file.

Thanks.
What I have done is create the mobile app project which requires a login page to connect to a database on the web site.
So I created the login page for the app project and did as advised created another web project so I could link to the web site server and database. The web project is on the web server and the database connection works fine.
My problem is connecting the app form to the database connection in the web project.
So should the form be an API form or a Server connect form?
And then how do I get the form fields or the data required into the web server project?
I am relatively new to this so thanks for your patience.