NetTalk Central

Author Topic: No fields in popup form, creating phone-app  (Read 204 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 538
    • View Profile
No fields in popup form, creating phone-app
« on: March 15, 2019, 02:28:47 PM »
Hi,

My first attempt to create a phone-app.

When I use forms in popup-mode, no fields appear in the form.
When I define the form as a link, the fields show themselves.
I have had this issue before e.g. having the login-form to appear as a popup. It showed no fields.
I worked around it then but now I need the popup mode.

Cheers,
Ren?




DonRidley

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 603
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: No fields in popup form, creating phone-app
« Reply #1 on: March 16, 2019, 08:27:48 AM »
Hello Rene,

Are you calling the form from a menu item or a browse?

If I remember correctly, I think you'll find that the form's primmiary key is not getting primed.

One thing I do to make debugging easier is to go in to nt-idb.js and un-comment out all of the console.log(""); entries.  You can then watch the underlying JavaScript do its magic at runtime.  You'll see if the tables are opened and read properly.

See ya,

Don
NetTalk 10.32
Clarion 10.12799

Rene Simons

  • Hero Member
  • *****
  • Posts: 538
    • View Profile
Re: No fields in popup form, creating phone-app
« Reply #2 on: March 16, 2019, 11:33:12 AM »
Hi Don.

One form is a memory form.
The other one is an update form for a file.

In the memory form, I have unchecked the Generate <FORM> tag checkbox.
Now the fields show. But there are other issues now.

Funny thing is that in the html-code, I can see the fields being there.
They just don't show up. Very frustrating.

In past, this has prevented me from using popup forms.

And this is just to get the hang of creating a working phone-app.

Thanks for your time.

Rene



DonRidley

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 603
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: No fields in popup form, creating phone-app
« Reply #3 on: March 17, 2019, 09:47:48 AM »
You'll find that the hidden fields are being hidden by CSS - nt-hidden.  I don't remember where, but there's a call to a JavaScript funtiocn to un-hide the element.  But, it diesn't answer why they are being hidden in the first place.
NetTalk 10.32
Clarion 10.12799

Rene Simons

  • Hero Member
  • *****
  • Posts: 538
    • View Profile
Re: No fields in popup form, creating phone-app
« Reply #4 on: March 17, 2019, 10:00:31 AM »
Hi Don,

Because I had only created 2 forms so far, I think I 'll clear the whole thing and restart.
(Gives me the opportunity to do a small redesign in my data model according to your idea of having multiple devices per user)
I'll keep you up to speed.
Thanks for the tips.

Cheers,
Ren?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9566
    • View Profile
Re: No fields in popup form, creating phone-app
« Reply #5 on: March 18, 2019, 12:15:47 AM »
Hi Rene,

examples always make it easier to understand what you are doing wrong, so feel free to post.

My guess would be that you are ticking on "allow xHTML" for some fields or headers etc, then entering non-valid xml in them.

cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 538
    • View Profile
Re: No fields in popup form, creating phone-app
« Reply #6 on: March 18, 2019, 12:32:19 AM »
Bruce,

Thanks for your reply.
As I wrote in reply to Don, I restarted the whole process.
When I have the browses and forms generated by the wizzard there are no problems. I'll settle for those and modify them carefully.
I will analyze the differences between my "handcoded" forms and the ones that seem to function normally.
I will certainly check the "allow xHTML" box as you mention.

Remaining question for me is the ThisDevice table.
Besides declaring the fields in the template (PWA-tab), do I have to and how do I handle that table?
Can I find an example for that somewhere?

Thanks,
Ren

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9566
    • View Profile
Re: No fields in popup form, creating phone-app
« Reply #7 on: March 22, 2019, 12:05:11 AM »
>> I will certainly check the "allow xHTML" box as you mention.

If you check that you are responsible to make sure the text is valid xHTML. If it is not the form will break. Ticking that option on means that responsibility falls on you, not me.

>> Remaining question for me is the ThisDevice table.
Besides declaring the fields in the template (PWA-tab), do I have to and how do I handle that table?

You'll need a server-side sync on that table as well.
You'll then use it as you need to use it - for logins etc...



cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 538
    • View Profile
Re: No fields in popup form, creating phone-app
« Reply #8 on: March 22, 2019, 01:45:00 AM »
Bruce,

>> I will certainly check the "allow xHTML" box as you mention.
With "check" I meant "see about" not ticking it when not strictly neccesary.

Ren?