These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Male or Female

ceekym
Registered: Mar 19 2010
Posts: 31

OK, you guessed it... Now, I need to know how to put in the values "M" or "F" in a field... Can someone answer that question?

My Product Information:
Acrobat Pro 8.0, Macintosh
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi ceekym,

Without a crystal ball I doubt it. Your question is too vague. Generally, radio buttons are used for this type data in a form. The user can either select a radio button alone or the selection of a radio button could populate another field on the form with M or F.

Hope this helps,

Dimitri
WindJack Solutions
www.pdfscripting.com
www.windjack.com
Jackmark
Registered: Mar 22 2010
Posts: 1
I think in this world Male and female both are keeps right that they could growth theie future. I love your article very much.

http://www.articlesbase.com/health-articles/advanced-cleanse-review-is-it-a-premium-weight-loss-colon-cleanser-2052004.php

http://www.articlesbase.com/finance-articles/automated-forex-trading-system-find-the-best-automatic-forex-trading-tool-2066204.php

Jackmark smith

ceekym
Registered: Mar 19 2010
Posts: 31
Ok, let me "rephrase" the question... In the form i am creating, there's a question that asks whether the applicant is a "male" or "female..." What I wanted to do was have an empty field where the user could only type in "M" or "F" and nothing else. In other words, even if the user tried to "spell out" the word "male" or "female," they would not be able to... Does that make more sense now?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Why not use radio-buttons? It's a much easier solution.
If you really want a text field, you can use a validation script to make sure the input is just M or F. You can also limit its length to just 1 character.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You can use Radio buttons, Check boxes, a Drop Down list, a Combo List or a Text field. If you use a text field, you can set the length to 1 character and add a validation script to check the entered value is either a null string (no response), an "M" or an "F".

George Kaiser

ceekym
Registered: Mar 19 2010
Posts: 31
Can you share with me what a "validation script" looks like, or how it should read?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You could use:
// force the entry to upper case for testing and displayevent.value = event.value.toUpperCase();// set return code as an error if not "M" not "F" or not an empty stringif( (event.value != "M") & (event.value != "F") & (event.value != "") ) {app.alert("Enter gender as \"M\" for Male or \"F\" for Female gender.", 1, 0);event.rc = false;}

George Kaiser