Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Local Amenities Checkbox

  • Jat
    Jat
    Newbie 4 points
    May 9, 2019 at 6:12 pm

    Hi all,

    does anyone know of or have any custom code so that the check boxes in the ‘Local Amenities’ remains UNCHECKED as default?

    @JamesD – i heard you might be able to help!

    Thanks,

    Jat

  • JamesD
    JamesD
    Super Guru 1,345 points
    May 9, 2019 at 9:20 pm

    Hello Jat,

    does anyone know of or have any custom code so that the check boxes in the ‘Local Amenities’ remains UNCHECKED as default?

    Try placing this with your custom javascript:
    jQuery('#form-row-rapper-amenities input[type="checkbox"]').trigger('click');
    Note: This is for the v9 theme.

  • Jat
    Jat
    Newbie 4 points
    May 10, 2019 at 6:15 pm

    Thank you JamesD!

    Where is the ‘custom javascript’ please?

  • JamesD
    JamesD
    Super Guru 1,345 points
    May 10, 2019 at 6:23 pm

    @Jat
    Try placing this in your _functions.php file:

    add_action( 'wp_footer', 'load_footerjs' );
    function load_footerjs() {
        ?>
    <script type="text/javascript">
    <!--
    jQuery('#form-row-rapper-amenities input[type="checkbox"]').trigger('click');
    //-->
    </script>
    <?php } ?>
  • Jat
    Jat
    Newbie 4 points
    May 10, 2019 at 6:34 pm

    That works, but i’m left with a very tall ‘Add Listing button’!

    See: http://test1.solihulllife.com/add-listing/

    I’m running WP 5.2 too

  • Jat
    Jat
    Newbie 4 points
    May 10, 2019 at 7:10 pm

    Any thoughts @JamesD?

  • JamesD
    JamesD
    Super Guru 1,345 points
    May 10, 2019 at 7:26 pm

    @Jat
    No clue what you’re experiencing.
    Account is required to view the link you provided.

  • JamesD
    JamesD
    Super Guru 1,345 points
    May 10, 2019 at 7:54 pm

    @Jat
    I just upgraded to WP 5.2 and it still works the same for me.
    Sounds like there may be a typo/overlap or something going on.

Viewing 8 posts - 1 through 8 (of 8 total)