New call-to-action
Results 1 to 16 of 16

Thread: radio buttons

  1. #1
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default radio buttons

    Believe me I have 'done due diligence' on this one...
    3 threads in v6 and 110 in v5.... pdf's, chm's, the works.
    Learned alot about radio buttons on forms and have been able to get them on the form and have scripts to hide or display fields and labels depending on the value of the field....
    The usual stuff, cash, check, credit card...
    I have tried the field as logical and character but I cannot get the choices to acknowledge the fact they are being chosen...
    The field 'blinks' when clicked on but the button will not change from a blank....
    Does anyone have any experiences similar, and if you solved it, how???
    D

  2. #2
    Former Alpha Employee Edward Larrabee's Avatar
    Real Name
    Edward Larrabee
    Join Date
    Nov 2002
    Location
    New Hampshire
    Posts
    1,385

    Default RE: radio buttons

    Did you define the choices for the field?

  3. #3
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,656

    Default RE: radio buttons

    The field 'blinks' when clicked on but the button will not change from a blank...

    That's a little bit unclear. Can you be more specific?

  4. #4
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    yes
    the field name is tx_payment_type, C,3
    the choices were:
    Credit Card|cc
    Cash|csh
    Check|chk
    Have a 'hide' script that fires on fetch, and hides all the
    secondary data associated with credit card and check.
    Also have 'hide/show' script that fires OnChange for this
    field that hides all if 'csh' and shows selectively for 'cc' and for 'chk'..
    ALSO:
    when I tried to enter a new record, a5 almost locked up and kept repeating 'invalid number'...
    Now, that just happened and I have not had time to determine whether or not it is being caused by the radio buttons, or some other field ahead of them...
    Will be back
    D

  5. #5
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    not really
    when you click on any of the radio buttons, there is a
    momentary 'shift' in color and opacity in and around the radio button; but the button will not change.
    The form is set up for no edits, but before I try to click on the button, I click on my 'change record' button which allows the changes to be made...
    In the bottom toolbar, the change icon is displayed - indicating change mode - and it clears if I press 'save record' button or 'cancel changes' button. All 3 of these buttons are run by Action Scripts...
    D

  6. #6
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    Ok just went and made a new db with a new form
    fields were name,c,25 -- amt,n,7.2 -- payment c,3
    edited the form and changed the character field 'payment'
    from 'type-in field' to 'radio button'.
    Listed the same choices as above and voila...
    as you would expect, it works just fine...
    That means that I have something
    in the table
    in the form
    in the embedded browse
    in the calculated variables
    or somewhere I can't think of
    THAT
    is blocking the proper function of the radio buttons...

    Can't give anymore info at this time
    Goin' back to work on it..
    Will pass along any additional problems and/or hopefully
    the final solution
    D

  7. #7
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    Ok --
    when I click on the buttons, they do the 'flyover thing'.
    they change from orange to grey..
    when I print out the value of the field in the Interactive window, it is = to the last radio button that I clicked...
    soooooooooooooooooo, the button is accepting the input and changing accordingly (I tried the above twice using two different buttons, so I know it's OK).
    What is not happening is that the button does not show that it has been selected....
    Since the 'value' is correct, I am assuming that the ability to hide/show portions of the form will work OK, and my data will be correct.. but it will not show on the form I am using to complete the customer transaction... and I really need it to be there....
    D

  8. #8
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    so much for assume:
    the onfetch 'hidden' fields and labels do not show up when
    the radio buttons are 'pressed'...

    the following is what comes from
    ?tx_open_form.tx_payment_type
    in the interactive window after 'pressing' credit card
    I'm lost..

    D
    Code:
    .Refresh()  'Force repaint of control.
    .Remember_Initial()  'Remember position/size information into initial property list(s).
    .Repaint()  'force a repaint of the control or window.
    .Reset_Anchors(N xsplit,N ysplit)  'Reset the anchors on objects based on x & y split (x/y less than one if axis ommitted).
    .SessionHandle()  'Returns the session handle of the TX_PAYMENT_TYPE window.
    .Show()  'Shows the TX_PAYMENT_TYPE window.
    .TextReplace(N start,N len,C text[,L processed])  'Replace control's text.
    .TextSelect(N start[,N len[,L processed]])  'Select control's text.
    .Type()  '
    align = "Left"
    +border.
    +choice.
    +code.
    +entry.
    +event.
    +field.
    +fill.
    +font.
    +initial.
    +object.
    rotation = 0
    +settings.
    +shadow.
    tag = ""
    text = ""
    value = "cc "
    vertical_align = "Top"
    word_wrap = .F.

  9. #9
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,656

    Default RE: radio buttons

    You have a lot going on there, I can see why you might be having problems. Clearly there is a conflict. Simplify everything to just the Radio Button portion of it - get rid of all the other junk. If that works (and it probably will), then begin addding all the other stuff one item at a time and test each stepp to make sure it is working - OR post your table/form here.

  10. #10
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    Thanks..
    I have already started doing that.
    I put the buttons on first and am rebuilding the form...
    Big PITB but worth it if it gets the job done...
    Still don't know why but I may find out what is causing the problem as I start to add back all the features that are now present on the 'troubled' form...
    I really do appreciate the help and the interest.
    Will post a solution -- if I find one
    D

  11. #11
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    Problem solved...
    I don't know why it works now but
    I just deleted the field and then dragged it back on the form
    made it into a radio button, listed the options, and it works..
    The only thing that may be the answer lies in the fact that the original 'drag and drop' did not seem to work smoothly
    there may have been something that I did wrong that caused the glitch..
    Sorry for any inconvenience and thanx for the help
    D

  12. #12
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,656

    Default RE: radio buttons

    Sometimes a field or an object gets corrupted for no good reason during the design process. The "good" news is, the more experience you gain, the more easily one identifies these problems.

    Best of luck!

    Peter

  13. #13
    Member
    Real Name
    Chuck Lafean
    Join Date
    Jul 2004
    Posts
    17

    Default RE: radio buttons

    Choices on a form only work when they are numbers-

    So... they should be

    Cash|1
    Check|2
    Credit Card|3

    or whatever- this is all I have gotten to work.

  14. #14
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    This script fires under the OnFetch event for the form and works just fine....
    Code:
    'Date Created: 03-Dec-2004 05:20:14 AM
    'Last Updated: 03-Dec-2004 08:18:28 PM
    'Created By  : R. Coleman
    'Updated By  : R. Coleman
    'Script Name :hid_payment_types
    
    'Conditional code follows. Executes only if the condition expression is True.
    IF topparent:tx_payment_type.value="csh" 
    	'Hide  everything on current form.
    	topparent:tx_credit_card_expire_lbl.hide()
    	topparent:tx_credit_card_expire.hide()
    	topparent:tx_credit_card_type_lbl.hide()
    	topparent:tx_credit_card_type.hide()
    	topparent:tx_credit_card_number_lbl.hide()
    	topparent:tx_credit_card_number.hide()
    	topparent:tx_chk_number_lbl.hide()
    	topparent:tx_chk_number.hide()
    	topparent:checkbox19.hide()
    	topparent:tx_chek_processed_lbl.hide()
    	topparent:checkbox20.hide()
    END IF
    
    IF topparent:tx_payment_type.value="crc" 
    	'Hide  check fields.
    	topparent:tx_chk_number_lbl.hide()
    	topparent:tx_chk_number.hide()
    	topparent:checkbox19.hide()
    	topparent:tx_chek_processed_lbl.hide()
    	topparent:checkbox20.hide()
    	'Show credit card fields.
    	topparent:tx_credit_card_expire_lbl.show()
    	topparent:tx_credit_card_expire.show()
    	topparent:tx_credit_card_type_lbl.show()
    	topparent:tx_credit_card_type.show()
    	topparent:tx_credit_card_number_lbl.show()
    	topparent:tx_credit_card_number.show()
    end if	
    
    if topparent:tx_payment_type.value="chk"
    	'Show check fields.
    	topparent:tx_chk_number_lbl.show()
    	topparent:tx_chk_number.show()
    	topparent:checkbox19.show()
    	topparent:tx_chek_processed_lbl.show()
    	topparent:checkbox20.show()
    	'Hide credit card fields.
    	topparent:tx_credit_card_expire_lbl.hide()
    	topparent:tx_credit_card_expire.hide()
    	topparent:tx_credit_card_type_lbl.hide()
    	topparent:tx_credit_card_type.hide()
    	topparent:tx_credit_card_number_lbl.hide()
    	topparent:tx_credit_card_number.hide()
    END IF
    
    end

  15. #15
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default RE: radio buttons

    A similar Action Script using the same "crc", "csh" and "chk" fires under the OnChange event on the radio buttons and that also works just fine....
    Depending on the choice, the action script hides all, hides one-shows the other, etc...
    It seems to work whether you use numbers or character variables...
    D

  16. #16
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,656

    Default RE: radio buttons

    That's not true - any value will work.

Similar Threads

  1. Multistate & Radio Buttons
    By Tom Cone Jr in forum Code Archive
    Replies: 1
    Last Post: 05-16-2005, 02:18 PM
  2. radio buttons redux
    By Chuck Lafean in forum Alpha Five Version 6
    Replies: 1
    Last Post: 12-13-2004, 03:18 PM
  3. Radio Buttons
    By Jeff, Richards in forum Alpha Five Version 5
    Replies: 14
    Last Post: 11-23-2003, 08:02 AM
  4. Radio Buttons
    By Bruce Roberson in forum Alpha Five Version 4
    Replies: 1
    Last Post: 01-30-2003, 02:17 AM
  5. Radio Buttons
    By TerriH in forum Alpha Five Version 4
    Replies: 5
    Last Post: 09-21-2001, 04:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •