Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Web Page with HTML form and FileMaker?

Featured Replies

Hello all!

I am new to FileMaker (about 5 hours new) and this is my first post! I'm not too sure if it's the right place but I think I might be close.

I designed a web page that has an HTML form on it. I would like to have the information from the form processed and inserted into a database in FileMaker. Can FileMaker do the processing of the form information and then stick the data into the database? Where should I look for information regarding the URL to submit my form to and what would I use to process the form data?

Thanks for your help!

Jason confused.gif

Hi, Jason! Welcome aboard... Your web form is a simple, classic example of an input form of some kind. I'll give you the code you can insert/modify, but you may want to check the posts for more info and examples. Read as much of the Web Publishing documentation that FileMaker gives you, too.

INPUT PAGE > FOLLOWUP PAGE

Your input page is just the web form you designed, but make sure your inputs are all named the same as its corresponding FMP field name. Also, insert code like below. The -format page is the Thank You page or whatever your visitors will see after submission. I only include a few of the basic codes to get you started but it will work. Have fun! --ST

<FORM ACTION="FMPro" METHOD="post">

<INPUT TYPE="hidden" NAME="-db" VALUE="nameofyourdb.fp5">

<INPUT TYPE="hidden" NAME="-lay" VALUE="nameofyourlayout">

<INPUT TYPE="hidden" NAME="-format" VALUE="pagetheyseeaftersubmit.html"

<!-- the rest of your body code goes here, including input boxes like below -->

<P> <FONT FACE="Arial, Helvetica, sans-serif" SIZE="-1">Name:

<INPUT TYPE="text" NAME="fieldname"> </FONT></P>

<!-- note the NAME of the text box is fieldname, the same as in your db -->

<INPUT TYPE="submit" NAME="-new" VALUE="SUBMITor other words appearing on button">

</FORM>

WebCompanion -- the web server from FM should generate the HTML page with form and receive it back and store the values in FM database.

P.S. Sorry, I didn't tell you about the URL stuff.. When you use the <FORM> tag, the action you specify is the server/cgi the form will submit to. In the example above, I use "FMPro" since it is the easiest/quickest to type and it's great for when we test and the host/ip changes depedning upon the machine we're using. Anyway, when we finalize our forms, we use lines like...

<FORM ACTION="http://www.yourdomain.com/FMPro" METHOD="POST">

<FORM ACTION="http://hostname.subdomain.domain.com/foldername/FMPro" METHOD="POST">

The latter designating the specific subfolder inside the FileMaker Pro Web folder in which we may have several web solutions running (survey, search, apply, etc.) that may use different db's or have different purposes of the same db's. If you have a static IP address, that's best. If you don't, use I suggest "FMPro" in your ACTION until you're done testing. If you'd rather use a GET instead of a POST during testing, that's ok.. just remember to change it back or your URL's will have long CDML strings in them. Learn what those strings mean when you get a chance. It'll help you when you start making your own CDML links to query your databases. --ST

Besides what Steve has passed on, you will find some examples in the "Samples" Forum.

Let us know what your setup is so that we have an idea of how it would be configured.

All the best.

Garry

  • Author

I have a question about your line:

<INPUT TYPE="hidden" NAME="-lay" VALUE="nameofyourlayout">

Does the 'nameofyourlayout' refer to something in FileMaker or could this be any name for this web page/form?

Also, the name attributes of the input tags have a hyphen '-' before the name. Is that how they should be?

Thanks.

Hi Jason,

First off, Anatoli seems to believe you may be using IWP. The other responses have been responses to the use of CWP (I designed a web page...).

You need to get the CDML Reference database.

Search that string on the CDML forum. You should find at least one referece which provides a link.

Name the layout in your db file either cgi or web. Put all the fields you want served on that layout. Then your code may look something like ...Value="cgi"...

"Can FileMaker do the processing of the form information and then stick the data into the database?" Yes, that is the role of CDML, which interfaces with FileMaker's built-in cgi. And that is why you need the CDMLRdb.

Bon chance.

I didn't think about IWP. In any case -- the WebCompanion/FM must send/receive the form by Instant rendering or by combination of authored HTML with CDML code. The principle is the same.

You cannot just call URL served from standard web server and send it back to the same server and have the data in FM. The WebCompanion must be involved.

"-lay" is a CDML tag. It refers to Filemaker Layouts. You should nominate a Layout so that the WebCompanion can access the fields on it.

Generally any tag with a "-" requires a value to be assigned to it. The exception are Action tags like "-find".

As Unable indicated, the CDML Reference database is a great resource.

All the best.

Garry

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.