-
Notifications
You must be signed in to change notification settings - Fork 138
Global variable support #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello and thanks for the feedback. I don't think what you need is a global variable. Everything that is global should probably be stored in the database itself. But in your case, if I understand well, the state you want to save is not global but client-specific. If two people are connected to the form at the same time, they don't want to see the same pre-filled values in the second form. I would have implemented what you are describing in one of three ways:
|
I'm closing this for the moment, but I'm open to reopening it if there is something I missed. The discussion is still open. |
Thanks for the advice, I've implemented cookies across the first 2 forms and a unique user_id that automatically increases on the last form submisson and then gets saved in the database accordingly. When the user want to edit the form I just reference back to the user_id created. I appreciate your advice, have a good one. Regards |
Can you still give a screenshot of your form, with the problematic "blank space" and the corresponding code ? Maybe there is still something to fix in SQLPage on that front ? |
And by the way, I am giving a talk about SQLPage at pgconf.eu this december, and I'd like to include feedback from users. If you have 15 minutes to chat about what you are using SQLPage for sometimes this week, I'd love to ! |
Congratulations, |
Ok, I see what you mean !
Just tried it, and there is actually still a small vertical margin that is added at the place of the hidden input. I will release a new version of SQLPage where hidden inputs are really completely hidden. I think there should be no visual difference between a form that has a hidden field and the same form without that field. Thank you for bringing this to my attention !
😊 I'll be in a meeting at that time, unfortunately. Can you do the evening (after 7pm GMT+2), or friday morning ? You can contact me on |
Hi,
Is it possible to add global variable support, across all of my SQLPage webpages.
I could be wrong, but I believe this is not a feature in SQLPage.
Currently I am working with 3 different form submissions, which updates a single row in my database.
This row has to be updated later on a separate page.
The reason I am using 3 form submissions is:
1st Form, The user Selects a Client. (Using a select box) (Creates a row)
2nd Form, The user Selects a Fleet based on the Client selected in the previous form. (Using a select box) (Updates the created row)
(The use of pre-defined select boxes allows me to prevent human error)
3rd Form, The user Submits information that has to update the row created in the first form.
Currently I am setting the
type = hidden
, essentially populating the input with a reference number that has been auto generated in the previous form and carrying it over the forms. I get the same results when setting the input toreadonly
.Without this I have no way of referencing which row to update in the database.
The problem with this solution it is not as neat, because it either results in a blank space or a input box with no purpose.
Possible solution:
I am not sure if it is possible, but keeping the already supported local variables syntax mentioned in #49 and enabling it to act as global variables as well?
The text was updated successfully, but these errors were encountered: