Centering IWP
If you turn off the status area in IWP and edit the file iwp.css (inside the “FM Web Publishing” package), you can get the entire site to center. Add this code to the file iwp.css:
.part, #part { margin-left: auto; margin-right: auto; max-width: 600px }
(Hint: Make sure that the max-width property is smaller than your smallest FileMaker layout width.)
Then to have FileMaker center all the layouts, select everything on each layout, and using the Object Info box, set the anchor on the top and deselect any other anchors. (This is for fixed-width solutions.)
List View issues
If you were planning to use a list view, FORGET IT! List views only show up to 25 records and then FileMaker wants you to page through them. There is no way to specify a smaller or larger paging size.
Instead, use a portal to show the same information. Portals have unlimited records.
If you need to perform a search, you can still list the results in a portal:
1) Get your found set of records
2) Copy all record IDs as a return-delimited list into a global field.
3) Create a relationship from that global field to the table where you got your search results from.
4) Set up a new layout with the background table being the table with the global field, and create a portal using the new relationship.
If you want pages as well (like max 100 records per page so that not all of them loads), set up two new fields:
1) page_number
2) page_records — A calculation field using the return-delimited list global field:
Let ( m = 100 ; MiddleValues(global_records; ((page_number – 1) * m) + 1; m ) )
Change the relationship to use the page_records field instead of the global_records field.
No preview mode
Forget about subsummary reports altogether. You’ll need to be very creative to accomplish anything like this. If you do need to, consider scripting the subsummary totals and storing them into fields. There is no sliding either, so this needs to be taken into account as well.
If you need to print things out, this is possible. Create a layout that fits on all browsers (about 700×885) and make sure to center IWP. However, you can’t create visible “Go Back” buttons for navigation (since they’ll print out), so you’ll either have to make certain areas of the layout clickable to return you, or you’ll have to do a PHP solution (see “No new windows” section).
Portal issues
If you are trying to submit data to a script by placing a button inside a portal, you might run into problems. For example, if the button or field that has the script on it is an image or field stored in a different table than the portal itself, data from the portal table will not be passed to the script.
No new windows
If you want the solution to open a new page in another window, it is nearly impossible to accomplish. IWP will open new “virtual windows”, but they’re useless. You can use Open URL to spawn a new window or tab, but if you use it to access IWP using a link, the session will then think that you’re in a new layout, and so the old window will have problems.
If you need the new window for display purposes, such as a print-out, create this using PHP designed in HTML instead. You can generate pages from FileMaker using whatever table you want (using fields from a specific layout) and then just borrow the code from that.
Image (container field) boundaries
You should make the boundaries of fixed-size image fields (containers) one pixel larger on each side and set it to crop, and then center it. This will make the graphic look correct in FileMaker and in all browsers.
If you need to stretch an image, just make sure that the boundaries are also one pixel larger on each side and set it to Reduce/Enlarge.
If you need lines to connect to or line up with graphics, DO NOT use FileMaker vector lines! The lines will not necessarily align properly in all browsers, and there will be a difference between a FileMaker session and IWP. Instead, save a one-pixel container image and then stretch this on a page (making the container field 3 pixels wide).
Image speed
If you want your images to load faster in IWP, you should set up web viewers instead of container fields. Web viewers would point to an image located on a web site.
Web viewers will show up in individual iframes (frames within pages on the web site). This way, the browser will cache the image, making it faster to load.
Here are a couple caveats to using web viewers:
1) You cannot use web viewers within portals.
2) iframes by default have a gray border. To fix this, edit your iwp.css file to include this line:
iframe {border:0px solid #FFFFFF; }
Text field boundaries
In IWP, you should make text fields larger than you normally would, especially the height. This is because different browsers have different text sizes, and the text easily gets cut off. Also, many fields do not justify properly (especially vertically), so you might have to toy around with the layout to find a happy medium between FileMaker and the different target browsers.
View Mode vs Edit Mode
IWP Browse Mode actually has two modes: View Mode and Edit Mode. When a record is not yet being edited, you will be in View Mode. IWP will enter Edit Mode as soon as you click into a field that is editable. You can also script it to go into edit mode by using the script step Open Record. Once in edit mode, IWP acts like a regular web site submit form, where nothing is actually changed until you hit a button that submits (or commits) the record.
Be aware that when you change the contents of a field in IWP, field calculations based on this will not change until the form is submitted (the record is committed). So the page is static until a scripted button is pressed!
No custom formatting
Custom formatting unfortunately doesn’t work in IWP at all. If you want text to change colors, make it part of a calculation field.
Disabled script steps
There are many script steps that you cannot use in IWP, most of them having to do with windowing, exporting to files, displaying dialog boxes, or dictionary features. Make sure that “Web Compatibility” is selected at the bottom right of the script editor when writing scripts.