Page 1 of 2

Form without Table

Posted: Wed Dec 15, 2021 3:30 pm
by oli
Hello,
I simply would like to create a form without a relation to any table.
On the form I just have some fields (values will be parsed in JavaScript) and a HTML object showing a calendar (Data will be filled by PHP).

I used the formtype "Launch" without table name or primary key.
After changing a date field on the form it needs to be reloaded to run the PHP script with the new selected date.

But using "nuSaveAction()" throws an error:
"Primary key is invalid - Launch forms cannot be saved"

Is there another way to use forms simply as a container for fields and HTML objects but to reload them after a field was changed?

BR, Oli

Re: Form without Table

Posted: Wed Dec 15, 2021 3:48 pm
by kev1n
Can you refresh the Launch form with nuGetBreadcrumb() ?

Re: Form without Table

Posted: Wed Dec 15, 2021 4:48 pm
by oli
nuGetBreadcrumb() works.

But when I load the form for the 1st time (after the login) the PHP code (in Before Edit) will not be processed and I have to refresh one time.
Is that a known behaviour and can I somehow force the processing of the PHP code?

Re: Form without Table

Posted: Wed Dec 15, 2021 4:51 pm
by kev1n
Are you using the latest version? Because I fixed a bug that might have been related to your issue.

Re: Form without Table

Posted: Wed Dec 15, 2021 5:15 pm
by oli
After updating nuBuilder it worked fine!!

Thank s a lot kev!n.

Re: Form without Table

Posted: Wed Dec 15, 2021 5:16 pm
by kev1n
:thumb:

Re: Form without Table

Posted: Thu Dec 16, 2021 2:56 pm
by oli
Sorry for reopening the topic but I am now facing the same issue again.
Same behaviour with other browsers (Edge, Chrome, Firefox) - the PHP code will not be executed after the page is opened for the first time.

Re: Form without Table

Posted: Thu Dec 16, 2021 3:24 pm
by kev1n
Did you add a nuDebug('BE event'); at the beginning of the BE event to see if the event is really not triggered?

Re: Form without Table

Posted: Thu Dec 16, 2021 3:29 pm
by oli
Yes, I did. And there is no nuDebug Entry until I did a manual refresh of the form.

Re: Form without Table

Posted: Thu Dec 16, 2021 3:35 pm
by kev1n
Is the form opened directly (as Home) after logging in? Are parameters (like f= ) passed in the URL?