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

Widgets fields not saving #684

Closed
bilalmalkoc opened this issue Mar 10, 2019 · 6 comments
Closed

Widgets fields not saving #684

bilalmalkoc opened this issue Mar 10, 2019 · 6 comments
Labels
[status] fixed; pending confirmation Issue fixed and released. Waiting for participants to confirm

Comments

@bilalmalkoc
Copy link

When press save it must be saved . But it not happens. So when i try close window, browser warning me. But fields are saving to instance.

use Carbon_Fields\Field;
use Carbon_Fields\Widget;

class NeonTabWidget extends Widget {
    function __construct() {
        $this->setup( 'neon_tab_widget', esc_html__( '# Neon Tab Widget', 'neon' ), esc_html__( 'Display awesome neon tabs in anywhere!', 'neon' ), array(
            Field::make( 'text', 'title', esc_html_x( 'Title', 'Neon tab widget', 'neon' ) ),
            Field::make( 'set', 'fields', esc_html_x( 'Choose fields', 'Neon tab widget', 'neon' ) )
                ->set_options( array(
                    'w_titles'   => esc_html_x( 'Show titles', 'Neon tab widget', 'neon' ),
                    'tooltip'  => esc_html_x( 'Show tooltip', 'Neon tab widget', 'neon' ),
                ) ),
            Field::make( 'text', 'tab_fields', esc_html_x( 'Tab fields', 'Neon tab widget', 'neon' ) )
                ->set_default_value( 'p,l,c,t' )
                ->set_help_text( esc_html_x( 'p => Popular posts | l => Latest posts | c => Latest comments | t => Tags cloud', 'Neon tab widget', 'neon' ) ),
            Field::make( 'text', 'popular_count', esc_html_x( 'Popular count', 'Neon tab widget', 'neon' ) )
                ->set_attribute( 'type', 'number' )
                ->set_default_value( 5 )
                ->set_width( 33 ),
            Field::make( 'text', 'latest_count', esc_html_x( 'Latest post count', 'Neon tab widget', 'neon' ) )
                ->set_attribute( 'type', 'number' )
                ->set_default_value( 5 )
                ->set_width( 33 ),
            Field::make( 'text', 'comment_count', esc_html_x( 'Comment count', 'Neon tab widget', 'neon' ) )
                ->set_attribute( 'type', 'number' )
                ->set_default_value( 5 )
                ->set_width( 33 ),
        ) );
    }

    // Called when rendering the widget in the front-end
    function front_end( $args, $instance ) {
    }
}

register_widget( 'NeonTabWidget' );
@alessandrotesoro
Copy link

alessandrotesoro commented May 26, 2019

Getting the same issue here, did you find a solution @bilalmalkoc ?

@bilalmalkoc
Copy link
Author

No i cant.

@bilalmalkoc
Copy link
Author

@htmlburger-git 3.1.3 same problem.

@K15Lmk98
Copy link

K15Lmk98 commented Oct 7, 2020

Problem still exists

@jorostoyanov
Copy link
Contributor

Guys, I have released v.3.2.2 with a fix for this issue. Please test and let me know if it is being fixed on your side :)

@jorostoyanov jorostoyanov added the [status] fixed; pending confirmation Issue fixed and released. Waiting for participants to confirm label Feb 23, 2021
@jorostoyanov
Copy link
Contributor

Please open a new issue if you happen to experience the problem again :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[status] fixed; pending confirmation Issue fixed and released. Waiting for participants to confirm
Projects
None yet
Development

No branches or pull requests

4 participants