Jump to content

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

Recommended Posts

Posted

I've tried every solution I can find to get either check boxes or radio buttons working on a record update page using CDML but nothing works.

In any case, is there a trick to getting values in a record to display correctly in a record detail page using radio buttons? Also, can I make them update-able?

I can get the radio buttons working fine in the new record page but no joy in the update page. I am using a value list.

Is it my imagination or does CDML do a fantastic job at text files, pop-ups and text area fields but stinks at radio buttons and checkboxes? Am I to assume that this is a serious flaw with CDML as I have yet to find a workable solution?

Here is my update page code. The field name is "cam" and the valuelist is "noyes" with values of No and Yes in that order.

[FMP-ValueList: cam, list=noyes] <input type="radio" name="cam" value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP- valueListItem] [/FMP-ValueList]

I have tried the solution fro checkboxes on the filemaker site for this but it one only works once. It fails to diplay the correct value on subsequent updates to the record.

Thanks in advance!!! (Again)

Posted

"... stinks at radio buttons and checkboxes? Am I to assume that this is a serious flaw with CDML as I have yet to find a workable solution?"

The answers to your queries may depend upon your understanding.

CDMLRdb:

Check Boxes

What it does

An HTML input type. Used by a browser to display checkbox(es).

This is not a FileMaker Pro tag, This is standard HTML.

Do not include calculation or summary field types on add or update format files, as data can't be entered into these field types.

Radio Buttons

What it does

An HTML input type. Used by a browser to display a radio buttons.

This is not a FileMaker Pro tag, This is standard HTML.

Do not include calculation or summary field types on add or update format files as data can't be entered into these field types.

Posted

Here is a Javascript method:

<script>

if ('[FMP-Field:gender]' == 'm') {

document.write('Male <input type="radio" value="m" name="gender" checked >');

document.write('Female <input type="radio" value="f" name="gender" >');}

else {

document.write('Male <input type="radio" value="m" name="gender" >');

document.write('Female <input type="radio" value="f" name="gender" checked >');

}

</script>

CDML [FMP-If] statements can also be used:

Male <input type="radio" value="m" name="gender" [FMP-If:gender.eq.m]checked[/FMP-If] >

Female <input type="radio" value="f" name="gender" [FMP-If:gender.eq.f]checked[/FMP-If] >

Good Luck.

Garry

Posted

Are the fields getting updated in FM?

Maybe the problem is with displaying on next page.

For that I did the condition IF Yes -- display yes ELSE -- display no.

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