Skip 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.

CDML/Portal Question

Featured Replies

Hi,

I'm trying to use a web form to submit information. For some reason I cannot get the [FMP-Portal] tags to work in displaying portal fields, however, I was able to successfully submit data using the following code:

<P>

Show Name: <input type="text" size=12 name="TimeCardID::t_show.1" value="[FMP-field:TimeCardID::t_show]">

<P>

But, alas I cannot figure out how to properly add a pop-up value list display to these fields. Any thoughts?

PS I'm familiar with HTML and am currently learning CDML as I go with that reference tool.

thanks!

Nate

Is the portal on the FMP layout specified in the -lay tag?

  • Author

Do you mean the link which calls the page? This is it if that is what you are referring to.

FMPro?-db=timeCard.fp5&-lay=Form_View&-format=new.html&-view

Nate

  • Author

Or, if you are referring to, here is the chunk of code with the -lay tag.

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

<P><INPUT TYPE="hidden" NAME="-DB" VALUE="timeCard.fp5">

<P><INPUT TYPE="hidden" NAME="-LAY" VALUE="Form_View">

<P><INPUT TYPE="hidden" NAME="-FORMAT" VALUE="newreply.html">

So is the FM portal working on layout "Form_View"?

  • Author

yeah, the portal works perfectly in the "Form_View" layout in the FM file. If I type data and submit it through this field:

<P>

Show Name: <input type="text" size=12 name="TimeCardID::t_show.1" value="[FMP-field:TimeCardID::t_show]">

<P>

The data submits just fine to the first portal row. But I can't figure out how to attach a value list retrieved from the FMP file to it.

On the other hand, if I try displaying portal rows using the [FMP-Portal:] tag, the web page does not render any code that appears between [FMP-Portal:] and [/FMP-Portal] . Nothing shows up where the portal and it's fields should be. Will it not display a portal on a new record submission page?

I'd prefer to use the former method for this page as opposed to the latter, so I'd like to figure out how to get the filemaker valuelists attached to the fields if possible. But, I'm sure I'm not getting something.

Nate

Are you using something like this:

[FMP-Portal: TimeCardID]

<select name="TimeCardID::t_show.1">

[FMP-ValueList:t_show]

<option value="[FMP-ValueListItem]">[FMP-ValueListItem]</option>

[/FMP-ValueList]

</select>

[/FMP-Portal]

All the best.

Garry

  • Author

Hi again,

Yeah. That's the way I tried to display the portal itself, but then nothing shows up when I go to view the web page. It's as f there is no code there at all.

  • Author

hmmmm. after a bit of tweaking, I was able to get the field to show on the web page, but the value list of completely empty.

Do you have that ValueList applied to the "t_show" field on the Layout?

You can also use the [FMP-CurrentPortalRowNumber] to edit each row as such:

<select name="TimeCardID::t_show.[FMP-CurrentPortalRowNumber]">

All the best.

Garry

  • Author

thanks for the response Garry. The ValueList is indeed applied to the "t_show" field which exists in a portal on the layout. I just realized that the ValueList I am trying to apply is taken from a list in another file. Does this make a difference?

I've also noticed that if I create the submit fields this way

________________________________________

<select name="TimeCardID::t_show.1">

<option value ="">- No Selection -

[FMP-ValueList: TimeCardID::t_show.1, List=activeShowsList]

<option>[FMP-ValueListItem]

[/FMP-ValueList]

</select>

________________________________________

or this way

________________________________________

<select name="TimeCardID::t_show.1">

<OPTION VALUE="">- No Selection -

[FMP-option: TimeCardID::t_show.1, list=activeShowsList]

</select>

________________________________________

both will display the "- No Selection -" in the list, but none of the ValueList values.

Related ValueLists don't seem to want to work through WebCompanion frown.gif However, a way may exist with a bit of rethinking!

Good Luck.

Garry

p.s. Try it without the ".1" in the [FMP-ValueList:] tag.

  • Author

Ugh! That's it. If, in my FMP file I change the value list to "all values" fromt the field the list is created from it works. If I change it back to "related values only" it no longer works. Nuts! That makes the values lists very large and unuseful...

ah, well. At least we figured out what the problem was.

thanks for your help

Nate

  • 1 month later...

This post comes about a month and a half after the (previous) end of this thread. Did anyone ever come up with a solution to using a related value list with WC?

Ken

You can use an InlineAction, or a Portal, to create the ValueList.

All the best.

Garry

Ahh. Great!

If I were to use a portal to populate the value list, how would I do this? I couldn't find it in the docs. Thanks.

Ken

You will need to have the Portal on your Layout (it could be hidden if neccessary). You can then use the following CDML/HTML:

<select name="myfield">

<option value="">Select a Widget</option>

[FMP-Portal:myvlistportal]

<option value="[FMP-Field:myvlistportal::field1]">[FMP-Field:myvlistportal::field2]</option>

[/FMP-Portal]

</select>

Hope this is of interest.

Garry

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.