stefangs Posted October 15, 2009 Posted October 15, 2009 this is a layout thing, but the problem i have is script related, so i think i'm right here. because i change field labels, i format my radio buttons with a generic 1,2,3 option. this is hidden, because i make the field very small, so you can't see the 1/2/3 text labels. when you now click an option, there's an ugly box around the buttons. therefore, i have disabled field entry and overlayed transparent buttons over the radio buttons. they are attached to individual scripts that change the field value accordingly. for a radio button with three options, that's already 3 scripts. considering there are many radio buttons in my solution, i already have a ton of scripts just for a simple function. is there a way to somehow parse field name, screen position, or something, into a single script that lets me change the radios without literals for each field and each option?
Raybaudi Posted October 15, 2009 Posted October 15, 2009 Using carefully the script parameters let you create only one script. Hint: each script parameter can have more than a value.
stefangs Posted October 15, 2009 Author Posted October 15, 2009 so you say it's possible... can you be a bit more specific? i wouldn't know where to start.
Raybaudi Posted October 15, 2009 Posted October 15, 2009 Start with: 1) give a name to a the object 2) put something like: 1 object1 into the space of the first script parameter. Make those steps for every radio button of the first field.
stefangs Posted October 15, 2009 Author Posted October 15, 2009 (edited) thanks, i think i get it. this means i can reduce the number of scripts to one per radio button set, but i will still need one script for each set, not one script for all radio button sets, correct? Edited October 15, 2009 by Guest
Raybaudi Posted October 15, 2009 Posted October 15, 2009 I think that you can reduce the number of scripts to ONE, whichever is the number of objects. radio_buttons.zip
Vaughan Posted October 15, 2009 Posted October 15, 2009 Even better, create a table that holds the labels for the values of 1, 2, 3. Create a value list that displays the second values only. Use this value list in the radio buttons.
mfrapp Posted October 16, 2009 Posted October 16, 2009 (edited) i dunno if i understand right but in this case i would use 3 value list vl1: 1 vl2: 2 vl3: 3 put on the layout 3 times the same field but show only the first radio button of each field (radio button type) each one with a different value list and that does the trick ** i think its what Vaughan was saying example: radiobtn.zip Edited October 16, 2009 by Guest
stefangs Posted October 16, 2009 Author Posted October 16, 2009 ah yes, i think that would do the trick and cut doen on the number of scripts. thank you for your template.
stefangs Posted October 16, 2009 Author Posted October 16, 2009 hi and thanks for your template. this works also and makes for a completely scriptless solution, but i thought that unframed radio buttons would look nicer. the frame around the radio buttons is something you always see in fm but nowhere else. that's whay i wanted to script around it. just a matter of style, not functionality, i suppose.
stefangs Posted March 28, 2011 Author Posted March 28, 2011 i'd like to pull out my old thread again, because now i want to do the same thing with check boxes. my radio button script ended up looking like this: GetValue ( Get ( ScriptParameter ) ; 1 ) on calling the script, i pass the name of the field and the value of the radio button like this: "fieldname¶value" i also have a nice script for a single check box: SetFieldByName | Get ( ScriptParameter ); Choose ( GetField ( Get ( ScriptParameter ) ) ; 1 )| but this breaks when you have two or more check boxes. i was hoping i can combine these two methods to create a neat check box. any ideas on how to do that? thanks, stefan
Recommended Posts
This topic is 4989 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 accountSign in
Already have an account? Sign in here.
Sign In Now