The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
-
Search Results
-
Hi,
I’m wanting to have my S&F form submit when the input value changes via javascript.
For example:
$("#button").on("click", function(){ $(".sf-input-text").val("Desired Search Term"); });
When the value is changed via javascript, nothing happens. The input has to be manually typed. Is there a way to trigger the submit event after the value is changed? I tried using .trigger(“input) with no luck.
Thanks
Topic: Author Dropdown by Last Name
I cannot figure out how to get the author dropdown to list them by last name.
I have a dropdown that does that in another part of our site using this script:
function authors_dropdown()
{
// Exclusion list. This could be passed as parameter to this function.
$excluded = array( ’14’, ’54’ );// Get authors to list.
add_filter( ‘authorship/user/roles’, ‘filter_user_role’ );
$authors = molongui_get_authors( ‘users’, array(), $excluded, array(), array(), ‘asc’, ‘last_name’ );
remove_filter( ‘authorship/user/roles’, ‘filter_user_role’ );?>
<select name=”author-dropdown” id=”author-dropdown–1″ class=”select-css” onchange=”javascript: this.value && (location.href = this.value);”>
<option value=””><?php echo esc_attr( __( ‘MEET OUR CONTRIBUTORS’ ) ); ?></option>
<?php foreach( $authors as $author ) : ?>
<?php $class = new Molongui\Authorship\Includes\Author( $author[‘id’], $author[‘type’] ); ?>
<option value=”<?php echo $class->get_url(); ?>” data-author-id=”<?php echo $author[‘id’]; ?>” data-author-type=”<?php echo $author[‘type’]; ?>”><?php echo $author[‘name’]; ?></option>
<?php endforeach; ?>
</select><?php
}How can I get the Search & Filter Pro dropdown to behave the same way?