start_controls_section( 'content_section', [ 'label' => __( 'Working Hours', 'plugin-name' ), 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); // Creating a repeater control $repeater = new \Elementor\Repeater(); // Add Day dropdown $repeater->add_control( 'day', [ 'label' => __( 'Day', 'plugin-name' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => $this->get_days(), ] ); // Adding Hours option $options = array(); for( $i=0; $i<24; $i++ ) { $hour = $i; if ( $hour < 10 ) { $hour = '0' . $hour; } $options[ $hour . ':00' ] = $hour . ':00'; } // Add Start Hour $repeater->add_control( 'start', [ 'label' => __( 'Start', 'plugin-name' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => $options ] ); // Add End hours $repeater->add_control( 'end', [ 'label' => __( 'End', 'plugin-name' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => $options ] ); // Adding the repeater control with all its controls $this->add_control( 'hours', [ 'label' => __( 'Hours', 'plugin-domain' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [], 'title_field' => '{{{ day }}}', ] ); $this->end_controls_section(); } }