Jump to content

checkbox in a found record????


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

Recommended Posts

  • Newbies

I have a search form for a database and when a user finds a record they can view the form but I can't get the checkboxes to work. In the submission form each checkbox is next to a picture of nice anti-aliased text. In the results form this does not work, all the examples I can find use the form :

[FMP-valuelist: iiCOLOR] <input type="checkbox" name="RGB" value="[FMP-valuelistitem]" [fmp-valuelistchecked]>[FMP-valuelistitem]</font>

<p><font size="2">[/FMP-valuelist] <input type="checkbox" value="RGB" name="iiCOLOR">

is there is a way to set up a checkbox that is standalone and not part a list of checkboxes? Does that make sense? I want to set up each checkbox indivdualy and not as part of a repeating section of code

Link to comment
Share on other sites

You want to "hard code" the check box options ointo the html format field rather than use the [FMP-ValueList] CDML stuff?

Yes (he says slowly) that should work <rubs chin in contemplative manner>

You'll have to completely forgo the value list and type the whole thing in yourself. This means that the list on the web page will need to updated by hand every time the value list changes...

try typing this:

<input type="checkbox" name="RGB" value="AAAA"><img src="antialiasedtextA.jpg><br>

<input type="checkbox" name="RGB" value="BBBB"><img src="antialiasedtextB.jpg><br>

<input type="checkbox" name="RGB" value="CCCC"><img src="antialiasedtextC.jpg>

I've found that checkboxes and radio buttons only appear correctly in the browser if they are in a valid FMP-Form on the format file.

Try that and see if it works. note that you have lost the ability for FMP to generate the options based on the value list.

Link to comment
Share on other sites

  • Newbies

I have that part worked out. The problem is that there is a search page where you can look up records that have already been entered. on the results page after the search the checkboxes don't seem to work. If I put in normal fields they show up fine but the checkboxes don't. All of the examples show cycling throught the value list. What I want to do is layout the page so that if a checkbox will be checked if that value is in the value list.

Link to comment
Share on other sites

This is where the [FMP-Option] CDML tags automatically work it out for you, but your solution cannot use them.

Instead you're going to have to do it all by hand, using [FMP-If] loops. It'll all be hard-coded into the html so changing value lists later is going to be a major (not just big) job.

[FMP-If: RGB.cn.AAA]

<input type="checkbox" name="RGB" value="AAAA" checked><img src="antialiasedtextA.jpg><br>

[FMP-Else]

<input type="checkbox" name="RGB" value="AAAA"><img src="antialiasedtextA.jpg><br>

[/FMP-If]

The difference here is the "checked" option if the value is present. The .cn. (contains) operator is needed because the checkboxes allow the selection of multiple options not just one. If it was radio buttons then .eq. could be used but .cn. would work too.

It's starting to look pretty complicated. I hope you are documenting this so you'll be able to change it in six months time.

Link to comment
Share on other sites

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