Jump to content

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

Recommended Posts

Posted

This is a two-part problem:

Part 1. I am trying to display the text contained in global fields on a form used to create a new record. I understand that the page with the form (and global text fields) on it has not yet been processed by the Web Companion and, therefore, the text in the global fields won

Posted

Hi, PS! Sorry, I don't have any concrete answers after a quick scan but here's my input...

Part I. global field display

As you noted, Web Companion needs to be triggered before any FMP data can be displayed, but you can use PHP or other scripting to access the DB and show the info w/out Web Companion, but since this is the CDML forum, I would answer: "No, I don't think you can. We do a FINDANY to trigger the Web Companion and immeditely transfer users to the main format page via a refresh. From there, you can show your global field info before making the new record."

Part II. Error page on -New

I scanned your code briefly and did not see anything sticking its tongue at me but I might have missed something. More likely, though, it's a problem with your web page settings and your database. Look for things like trying to assign values to fields that don't exist or are called something else. I had problems with radio buttons and assigning a non-value list value. Methodically, I solved my problem by breaking my form into 4 major parts and saved each one as a separate form. Then I tested each one until I found the one (actually I had 2 different errors, but you see what I mean) that had problems and fixed it. Big forms are tough to track down but little forms are a lot easier.

Also, you may want to either remove the error page tag so FMP can try to tell you the error it's getting or you can try to trap the error by storing the error number in a global field or showing it's number on your custom error page. Sometimes I've gotten false error notation but other times it has been really helpful to know WHAT KIND of error FMP/WC is experiencing.

You'll find it, I'm sure.

Posted

" Is there a way around this so that I can get the global contents to display on the page that creates the new record?"

Probably more than one.

First idea, don't use globals, but use something else. Probably does not meet your requirements.

Second idea. Create an inoccuous record. When your client clicks whatever link you are using to get to the "query.htm" (where your form is), take them there via a hard-code to a -find of that inoccuous record and capture the globals from there.

Posted

A caution.

When you get your -new to work you may want to test what occurs when your client arrives directly at success.htm, then clicks the "Reload" button in Netscape. The client is asked if they want to "Repost

Form Data" and most will click "Yes". Check your db following that client action.

Posted

Many thanks to all. After reading everyone's threads, I got everything to work!!

I commented out the error page and got the error 102 (missing field). Sure enough, I was trying to submit data for a field that I thought I'd created, but hadn't created yet (What the #&%$?).

I created a new layout with all of the fields that I would possibly need on the form and referenced the layout on the form page.

Used -View to see all those globals: They magically appeared.

I was ready to declare victory at 9:30 this morning and call it a day, but I'm on a roll!

Thanks again, guys ...

This topic is 8045 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.