Jump to content

Non FMP field in a form


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

Recommended Posts

I'm not sure that I fully understand what you want to do.

The field is in another (non FMP) form that you will submit and you want to also create a FMP record with that same field value?

This sounds like 2 form submittals, which will require either 2 windows/frames or passing values via cookies.

I can think of a way to do it using javascript, if this is the case.

Link to comment
Share on other sites

Either the html form field passes the data to a FMP field, or it doesn't. If it does then use the standard CDML/HTML syntax...

<INPUT TYPE=text NAME=fieldname VALUE="" SIZE=25>

...where fieldname is the name of the FMP field.

This input neess to be inside a standard FMPro form with -db, -lay, -format and -error parameters specified. If you aren't sure how to do this, get yourself a 30 day free trial version of Claris HomePage 3 from the FileMaker Inc web site:

http://www.filemaker.com/downloads/index.html#trialsoftware

Use Home Page's "FileMaker Connection Assistant" to build yourself a basic set of custom format files.

Link to comment
Share on other sites

quote:

Originally posted by Vaughan:

Either the html form field passes the data to a FMP field, or it doesn't. If it does then use the standard CDML/HTML syntax...

<INPUT TYPE=text NAME=fieldname VALUE="" SIZE=25>

...where fieldname is the name of the FMP field.

This input neess to be inside a standard FMPro form with -db, -lay, -format and -error parameters specified. If you aren't sure how to do this, get yourself a 30 day free trial version of Claris HomePage 3 from the FileMaker Inc web site:

Use Home Page's "FileMaker Connection Assistant" to build yourself a basic set of custom format files.

No No..smiles..I have one form, but I have a quantity field on the form...but the database doesn't have a quantity field in it (and I don't want to create one), so I just created a field in the form (i.e. <Input type="text" name="qty" value=1> ). The value is a default, so that the person filling out the form can change it. Now instead of submitting the form, I have a link on the form that submits the information to another database, which has a quantity field, so as part of the link I put ...snip...Quantity=qty

but when I put that the quantity field doesn't get the number value from the form, it gets the letters qty put in. What I want is it to take the value. How can I get it to do this? Thanks in advance

Link to comment
Share on other sites

The link that people click on has "hard-coded" in it the instruction to insert the literal text "qty" into the field named Quantity -- "Quantity=qty" -- that's the link's logic.

"What I want is it to take the value. How can I get it to do this?"

<sigh> I was going to suggest a token but I think you'd still have to put the value into a field first.

<flash of insight>

Hey, you've got people typing into a form, then they click on a link rather than the submit button... DING! Unless the web user clicks on the submit button the form isn't being processed! The hard-coded action in the url is being processed instead which just tells the database to insert "qrty" into the field Quantity. The web user can type whatever they want into the form, it won't do anything because Web Companion never sees it it only sees the link's instruction.

That's the problem. The submit button needs to be clicked for the form to work. But here is the Catch-22 for your setup: forms can only insert data into fields. You have a text input on the form that does not have a corresponding field in the database so when people click on the submit button Web Companion will return an error, and the error page show up and nothing will happen in the database.

You wrote: "...the database doesn't have a quantity field in it (and I don't want to create one)"

I think you might have to reconsider this decision. I cannot see a way around it. I originally wrote "Either the html form field passes the data to a FMP field, or it doesn't" and I cannot see how to do it without a field in the database...

Even if the field isn't used for calculations, just put it in there and try it, see if it'll work. You could then pass the value onto a token and take it into the next database that way if nothing else works.

Link to comment
Share on other sites

With javascript in the web page you could make it so when the link is clicked, the value in the "qty" field in one form is passed to a function that concatenates the FMP edit URL string that you created and sends that to FMP (URL to open in a new window). The -format page used in the string should be a new window that you could have automatically close after it loads.

Vaughan is right about the form submittal to FMP with a field not in the database. You should move it to a form outside of the FMP submitted form.

[This message has been edited by dspires (edited December 01, 2000).]

Link to comment
Share on other sites

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