cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
aidanweb
Level II

Giving options for user to select from, storing selection as string

Hi, here's my current code that displays a popup window for user input. 

aidanweb_0-1690678749857.png

 

 

I want it so that for Level:, they can choose between two options (each option having a box next to it that the user can tick to select one). What would I have to add to my code to get that? Here's a picture of what I want the "level" user input to look like:

aidanweb_1-1690678590732.png

Where the user can select one or the other before clicking "Save." Then, store "THIS" or "THAT" as a string depending on their selection. Thanks!

 

Note: If a dropdown menu is easier, that would work too. 

 

1 REPLY 1
txnelson
Super User

Re: Giving options for user to select from, storing selection as string

Here is a simple example to show you one way of handling this

Names Default To Here( 1 );

r1 = Radio Box( {"This"} );
r2 = Radio Box( {"That"} );
New Window( "Example",
	V List Box( H List Box( r1, r2 ) ),
	Button Box( "Save",
	show(r2<<get);
		If( r1 << get == 2,
			theSelection = "This",
			theSelection = "That"
		);
		show(theselection);
	)
);
r2 << Group( r1 );

txnelson_0-1690685474202.png

 

Jim