protected function prepare_fields( Form $form ) {
		foreach ( $form->all() as $field ) {
			/* @var $field \WPLibs\Form\Field */
			if ( ! $field->should_show() ) {
				return;
			}

			$_section = $field->get_option( 'section' );

			if ( ! $_section || ! isset( $this->sections[ $_section ] ) ) {
				continue;
			}

			$this->sections[ $_section ]->fields[] = $field;
		}
	}
protected function prepare_fields( Form $form ) {
		foreach ( $form->all() as $field ) {
			/* @var $field \WPLibs\Form\Field */
			if ( ! $field->should_show() ) {
				return;
			}

			$_section = $field->get_option( 'section' );

			if ( ! $_section || ! isset( $this->sections[ $_section ] ) ) {
				continue;
			}

			$this->sections[ $_section ]->fields[] = $field;
		}
	}
protected function prepare_fields ( Form $ form ) { foreach ( $ form -> all ( ) as $ field ) { /* @var $field \WPLibs\Form\Field */ if ( ! $ field -> should_show ( ) ) { return ; } $ _section = $ field -> get_option ( 'section' ) ; if ( ! $ _section || ! isset ( $ this -> sections [ $ _section ] ) ) { continue ; } $ this -> sections [ $ _section ] -> fields [ ] = $ field ; } }
Maps fields into their section.

@param \WPLibs\Form\Contracts\Form $form
Maps fields into their section .