MySQL data read back into Form...

User 158708 Photo


Registered User
25 posts

I would like to see Web Form Builder have the capability to take a form that you created and then be able to prepopulate fields from the database right back into the form. So you can review records. Have forms that prepopulate or populate after a trigger is entered in a field.

The problem I have now is I built a page that you enter basic "daily" info that changes by the hour. It would be great if I can go to the form and it displays the last entries made into the fields on that form.
Why sleep when I can work...

"I told my son my car was a race car... He paused, thought then asked.."Than why does it have a radio?"
User 187934 Photo


Senior Advisor
20,181 posts

You can do this yourself with a little coding.:cool:.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 158708 Photo


Registered User
25 posts

I can. And I do. The hassle is if I make changes to the form, I have to redo all the SQL code again. I want it in the program so I can worry about other things. Just being lazy....:)
Why sleep when I can work...

"I told my son my car was a race car... He paused, thought then asked.."Than why does it have a radio?"
User 187934 Photo


Senior Advisor
20,181 posts

If I make a change to the form I do the opposite and grab the changed part form the newly exported form and place it in the old one. Then save the old one over the top of the new one and then publish. Makes for way less work.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 158708 Photo


Registered User
25 posts

That's what I do also. Agreement! But I do not want to do it manually....
The change I am proposing is while you are building your form in Form Builder you can go to form preference's and click on "Connect to MySQL" and enter the login information. Much the same way we do to setup saving the form data to MySQL currently. Then while you are working on your form and you add a form field lets say. You can select an option to "link" to and pull the data to that field from a database record field from the feed table side. This could not be too hard to add to Form Builder at this point.
Why sleep when I can work...

"I told my son my car was a race car... He paused, thought then asked.."Than why does it have a radio?"
User 187934 Photo


Senior Advisor
20,181 posts

I have been able to relieve some of the pain by using an html element and use classes and id's similar to the form builders to include <?php include('mypage.php');?>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2212453 Photo


Registered User
10 posts

Can you guys give me some help, I have a change of address form that I want to have the old address fields as read-only and populate the form from an exist SQL database variable?

Cheers
Chris
User 187934 Photo


Senior Advisor
20,181 posts

Add the readonly attribute to the input
<input type="text" name="text1" value="<?php include('mypage.php');?>" readonly>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2212453 Photo


Registered User
10 posts

So do you just echo the variable in the php file?

Thanks

Chris
User 187934 Photo


Senior Advisor
20,181 posts

The php file will have your mysql connection and necessary code to extract the wanted value.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.