# How can I make opening hours required

**URL:** <https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598>\
**Category:** Opening Hours\
**Tags:** opening-hours\
**Created:** [February 6, 2024, 10:56am UTC](https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598 "2024-02-06T10:56:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveenpandey](https://community.hivepress.io/user_avatar/community.hivepress.io/naveenpandey/32/8602_2.png) [@naveenpandey](https://community.hivepress.io/u/naveenpandey)\
**Post date:** [February 6, 2024, 10:56am UTC](https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598/1 "2024-02-06T10:56:19Z")

</div>

I want to make opening hours required in the listing submission form , kindly help

I have tried this code but it doesn’t working correctly

```auto
(add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		$form['fields']['opening_hours']['required'] = true;

		return $form;
	},
	1000
); )

```

here is my website form([Sign In – List Of Local Australia](https://www.listoflocal.com.au/submit-listing/details/))

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [February 7, 2024, 2:15pm UTC](https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598/3 "2024-02-07T14:15:14Z")

</div>

Hi,

Please check the solution in this topic [Make opening hours required - #2 by andrii](https://community.hivepress.io/t/make-opening-hours-required/6685/2)

​I hope this is helpful to you.

P.S. If you purchased a theme or extension, please enter the license key in the forum profile settings, this will enable the Premium Support badge and ensure a 24-hour turnaround time.

---

<div class="post-metadata">

**Author:** ![naveenpandey](https://community.hivepress.io/user_avatar/community.hivepress.io/naveenpandey/32/8602_2.png) [@naveenpandey](https://community.hivepress.io/u/naveenpandey)\
**Post date:** [February 7, 2024, 2:30pm UTC](https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598/4 "2024-02-07T14:30:27Z")

</div>

I have applied this code but even after user fill in opening hours the form still not submitting and showing required alerts

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [February 8, 2024, 1:09pm UTC](https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598/8 "2024-02-08T13:09:56Z")

</div>

Hi,

If you purchased a theme or extension, please enter the license key in the forum profile settings, this will enable the Premium Support badge and ensure a 24-hour turnaround time.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [March 9, 2024, 1:10pm UTC](https://community.hivepress.io/t/how-can-i-make-opening-hours-required/9598/9 "2024-03-09T13:10:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
