Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5623 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

There's nothing as humbling as learning something new!

I'm trying to build a simple site in order to learn PHP. I've created a FM file with two fields. They are formatted as popup menus, and the second's choices are conditional upon the first.

I ran the PHP Site Asst. and have a little sample site. However, the second popup's choices are not updating if the first choice is changed (I need the commit/reload).

So, I poked around FM Advisor and found J. Starke's sample of how to create condtl value lists in PHP using Ajax. However, his example doesn't include editing an existing record, just submitting a new one. I can't seem to see how to load an existing record without wiping out the data in the popups.

And so, here I am. I understand what Jonathan did, but not enough to add it to my site, so that I can load an existing record, and edit it with my popups working conditionally.

Love to be pointed in the right direction for examples. Any good php forums out there?

Posted

First off, I truly I loathe the site assistant. Its code is pretty much not extensible and is unnecessarily obtuse.

I would highly recommend that you not use the Site Assistant to learn PHP. Backing up I'd actually start with simple non FMP-API PHP. There are several on-line tutorials and/or books to get you started with the basic syntax and functionality. PHP's on online documentation is also quite good. http://www.php.net/manual/en/

If you insist on starting with the API, I'd advise taking a look at the the API example code included with the FMS installation. /HD/Library/Filemaker Server/Examples/PHP/API Examples on my Mac sandbox.

If you're going to use Ajax you're going to need to learn JavaScript as well (this is most likely the root of your problem).

There a several Web development bulletin boards out there, but I'd try Google before posting on most of them. I'm also happy to answer any general PHP questions here.

Lastly, It will be a lot easier to point you in the right direction once I have a better idea where you are. i.e please post the code you have, and I'll take a look at it.

Posted

Baloo, many thanks.

I find that the php tutorials are very basic (even the php manual) and don't show how to do "advanced" interface methods, such as condtl value lists.

Not surprising that the PHP SA produced pages aren't the best examples of code. Kinda like any wizard.

I've bothered the wonderful Alex (Genx) for some help, and he has provided me with some sample code to study.

I'm sure I'll be back.

Posted

I find that the php tutorials are very basic (even the php manual) and don't show how to do "advanced" interface methods, such as condtl value lists.

That's because PHP isn't an interface language. It's a server side scripting language. Your interface will generally be written in HTML, CSS, and JavaScript.

Also if you're going to use Ajax I've found JSON (instead of XML) to be the bast way to pass data from PHP to Javascript. It's also a lot easier thanks to PHP's built in JSON functions

One more tip: when Googling for help use HTML semantics instead of Filemaker semantics

Posted

Yes, I understand. Thanks for the link. My whole project is out there, written in pieces!

This takes me back to reviewing JMO's demos and piecing together his techniques to create a system.

This topic is 5623 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.