Jan 7, 2013 at 1:17 PM
Edited Jan 7, 2013 at 8:47 PM
After a weekend of study and experimentation, I came up with a one-page example that may help some people getting up to speed on AVFP. I know it was helpful for me to go through this exercise.
What I'm providing here is a very basic page showing various ways to work with AVFP. What's being shown:
1. Simulate a bunch of variables created by the previous web page
2. Open the EXPERTS.DBF table
3. Move the Session variables to EXPERTS.DBF
4. Display table fields from EXPERTS.DBF
5. Display Session variables just created
6. Display table fields in form Radio Buttons
7. Display Session variables in Checkboxes with one button checked
8. Display table fields in text boxes (encloed in an HTML table )
Here you go:
Test page on GoDaddy shared server. When you visit this page, it will automatically add a record to the EXPERTS.DBF table on my GodDaddy shared server.
Source code in verify.txt for you to download which includes all merged VFP and HTML code. Once you download the .txt file, you should change the
extension to verify9.htm. That's the file located in the HTML folder of the AVFP directory on my server and that's being called as an HTML template.
Color Coded version of verify9.htm will be easier for you to see the main sections of CSS, VFP, and the FORMS areas.
If you haven't already, do pick up a free copy of
Notepad++. I'm finding this to be an outstanding editor with color coding that detects errors in your code (not in VFP code unfortunately, but you already know that).
Another resource that is helping me get up to speed is a very clear and simple explanation of HTML forms. : It's on
Oh, and the debugging is actually pretty good. As I was creating this demo page, I would make errors and it would usually isolate the line number where the error was occurring.
Don Higgins recently posted on Foxite.com that AVFP is very easy once you get the feel for it. I'm beginning to see what he meant.
I'm finding that most of the power is contained in very few functions as this page demonstrates. In fact, once you get AVFP running successfully on your server, I wouldn't even bother looking at the documentation just yet because it will probably scare
you away. There was certainly too much for a beginner like me. I'm using the documentation to explore the meaning of the functions, but not intensively studiying the documentation. If you run into issues, just pop a question here on Codeplex.
One thing I didn't know until a couple days ago is that you need to open up the WRITE permissions on the AVFP folder where your DBFs are stored. The GoDaddy dashboard allows you to do that yourself. But until you set the WRITE permissions on,
your code won't allow you to write to DBF files. You will get a READ ONLY error. So there's a fair bit of setup knowledge here, so you can't be afraid to reach out and ask questions.
When I looked at AVFP a year ago, I was jumping back and forth between the main.prg file and the HTML template I was working on. Seems like AVFP Has improved and that for basic form applications, I guess you only need to use the HTML template. That's
Thank you for AVFP, Claude, and also to the many other contributors on Codeplex and elsewhere whose ideas are embodied in AVFP. The on-line support here has been great.
Next step for me is to master moving from page to page using query strings. When I figure that out I'll drop another note on Foxite and here.
all these links are broken now.
Jul 27, 2013 at 4:37 PM
Edited Jul 27, 2013 at 4:39 PM
all these links are broken now.
Well, it's 7 mos. old. from someone who was just experimenting. What do you expect??
The demo links for AVFP still work. They still show source code. The source code is is available here to view or download. The docs are here and readable ( maybe not perfect but unless you can come up with better, DON"T COMPLAIN!) Why are you whining so