manishsaharan โ created an issue.
I am requesting to Re-open this issue.
After using #3 suggestion, still not getting 'from' value on the form submit inside $form_state.
$form['price']['range'] = [
'#type' => 'container',
'widget' => [
'slider-price-range-from' => [
'#type' => 'hidden',
],
'slider-price-range-to' => [
'#type' => 'slider',
'#input_title' => '',
'#animate' => 'default',
'#disabled' => FALSE,
'#min' => 1,
'#max' => 50,
'#step' => 1,
'#orientation' => 'horizontal',
'#range' => TRUE,
'#multi_value' => TRUE,
'#size' => 10,
'#display_inputs' => FALSE,
'#display_values' => FALSE,
'#display_values_format' => '$%{value}%',
'#display_bubble' => TRUE,
'#display_bubble_format' => '$%{value}%',
'#slider_length' => '200px',
'#display_inside_fieldset' => FALSE,
'#validate_range' => TRUE,
'#hide_slider_handle_when_no_value' => FALSE,
'#fields_to_sync_css_selector' => [
0 => '[name="slider-price-range-from"]',
1 => '[name="slider-price-range-to"]',
],
'#values' => [10, 40],
],
],
'#states' => [
'visible' => [
':input[name="price[value][custom]"]' => ['checked' => TRUE],
],
],
];
Patch #6 worked for me. Thanks @kala4ek!
Hi @slogar32, Very thanks for your review, I don't know how I missed this part, but I apologize for pushing the buggy code, actually, this happened during merging someone MR. Right now I have updated the code and pushed it to the same branch and tested it thoroughly.
/**
* The element info manager.
*
* @var \Drupal\Core\Render\ElementInfoManagerInterface
*/
protected $elementInfo;
/**
* Constructs a TextSummaryOnlyFormatter object.
*
* @param string $plugin_id
* The plugin_id for the formatter.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The definition of the field to which the formatter is associated.
* @param array $settings
* The formatter settings.
* @param string $label
* The formatter label display setting.
* @param string $view_mode
* The view mode.
* @param array $third_party_settings
* Any third party settings.
* @param \Drupal\Core\Render\ElementInfoManagerInterface $elementInfo
* The element info manager.
*/
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, ElementInfoManagerInterface $elementInfo) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->elementInfo = $elementInfo;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$plugin_id,
$plugin_definition,
$configuration['field_definition'],
$configuration['settings'],
$configuration['label'],
$configuration['view_mode'],
$configuration['third_party_settings'],
$container->get('element_info')
);
}
manishsaharan โ created an issue.
Thanks @urvashi_vora for finding and fixing the issue.
The issue is fixed and pushed.
This is working fine, so marking the status to be fixed.
Thanks!
manishsaharan โ made their first commit to this issueโs fork.
#2 can't be re-rolled since there is no such file views/src/Plugin/views/filter/EntityReference.php present in d10.
Re-rolled patch for 11.x. Keeping this in "Needs work" to update the test as per #62.
Removed whitespace errors and Re rolled patch with 11.x.
Patch size increased because in the #16 phpcserrors also fixed. Attaching interdiff file for the same.
Tried to fix #26.
#29 works fine for me, patch applied successfully
Fixed coding standard and rerolled patch for 10.1.x
Rerolled patch for 10.1.x and also fixed coding standard for
core/modules/user/src/Form/UserPasswordForm.php
core/modules/user/src/UserAccessControlHandler.php
core/modules/user/tests/modules/user_access_test/user_access_test.module
core/modules/user/tests/src/Functional/UserPasswordResetTest.php
Rerolled #16 for 10.1.x
Failed to apply patch and also in version 8.3 this issue is not fixed yet
manishsaharan29497 โ created an issue.