Skip to content

Commit

Permalink
Add selected field (#2101)
Browse files Browse the repository at this point in the history
- If you have a select field with optgroup in the search bar, The option
will not be selected if you submitted the search form with a chosen
option, this fixes that issue
- Fixes #2100
- Also have to be merged for this PR to fully work
GravityKit/Event-Field#63

💾 [Build
file](https://www.dropbox.com/scl/fi/w6nfhluioku7f4wbjoltr/gravityview-2.25-f687ce739.zip?rlkey=d9x6ldp1vi7nnjr60pb8lmgu0&dl=1)
(f687ce7).
  • Loading branch information
zackkatz authored Aug 12, 2024
2 parents c5fa025 + 1909f67 commit 8a0c9dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<?php if ( is_array( $choice['value'] ) ) { ?>
<optgroup label="<?php echo esc_attr( $choice['text'] ); ?>">
<?php foreach ( $choice['value'] as $subchoice ) : ?>
<option value="<?php echo esc_attr( $subchoice['value'] ); ?>"><?php echo esc_html( $subchoice['text'] ); ?></option>
<option value="<?php echo esc_attr( $subchoice['value'] ); ?>" <?php gv_selected( esc_attr( $subchoice['value'] ), esc_attr( $search_field['value'] ), true ); ?>><?php echo esc_html( $subchoice['text'] ); ?></option>
<?php endforeach; ?>
</optgroup>
<?php } else { ?>
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h

== Changelog ==

= develop =

* Fixed: When searching a View, the searched time zone would not appear as selected in the Search Bar.

= 2.26 on August 8, 2024 =

This update resolves various issues, including compatibility with Yoast SEO, improves performance through enhanced View entries caching, and adds new functionality.
Expand Down

0 comments on commit 8a0c9dd

Please sign in to comment.