Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radio field not displaying checked #1699

Closed
michelle-may opened this issue Dec 11, 2017 · 0 comments
Closed

Radio field not displaying checked #1699

michelle-may opened this issue Dec 11, 2017 · 0 comments
Milestone

Comments

@michelle-may
Copy link

Issue description:

I need a little help troubleshooting. I'm having an issue with two of my fields I'm using for layout switching. The field never shows the default as checked, even though it loads the correct default. If I choose a different option, it will show the radio button as checked, but if I go to a different screen in the customizer, and then back to my layout screen, all the radio buttons show as unchecked again. The related layout function still works and still displays the correct layout.

This does not happen with radio-buttonset, which shows the checked option on default and on change.

Version used:

Develop

Using theme_mods or options?

Theme mods

Code to reproduce the issue (config + field(s))

$fields[] = array(
	'settings' => 'posts_layout',
	'type'     => 'radio',
	'label'    => __( 'Select layout', 'brio-maia' ),
	'section'  => 'home_layout',
	'default'  => 1,
	'priority' => 10,
	'choices' => array(
		1 => __('1 Column (Post with Excerpt)', 'brio-maia'),
		2 => __('List Style: 1 Column', 'brio-maia'),
		3 => __('Masonry Grid: 2 Column', 'brio-maia'),
		4 => __('Masonry Grid: 2 Column, First Post 1 Col', 'brio-maia'),
        5 => __('Masonry Grid: 3 Column', 'brio-maia'),
        6 => __('Standard Grid: 2 Column', 'brio-maia'),		
        7 => __('Standard Grid: 3 Column', 'brio-maia'),		
        8 => __('Standard Grid: 4 Column', 'brio-maia'),		
        9 => __('1 Column Standard, Full Content', 'brio-maia'),		
	),
);

This is one of my layout switching fields. I have also tried naming the options instead of using numbers.

@aristath aristath added this to the 3.0.20 milestone Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants