# Make tiers required in add listing form

**URL:** <https://community.hivepress.io/t/make-tiers-required-in-add-listing-form/6861>\
**Category:** Marketplace\
**Tags:** marketplace\
**Created:** [August 2, 2023, 9:48pm UTC](https://community.hivepress.io/t/make-tiers-required-in-add-listing-form/6861 "2023-08-02T21:48:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yufit](https://community.hivepress.io/user_avatar/community.hivepress.io/yufit/32/4231_2.png) [@Yufit](https://community.hivepress.io/u/Yufit)\
**Post date:** [August 2, 2023, 9:48pm UTC](https://community.hivepress.io/t/make-tiers-required-in-add-listing-form/6861/1 "2023-08-02T21:48:15Z")

</div>

Hello is there any manual way, or snippet code, to make at least one tier compulsory for vendors?

---

<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:** [August 3, 2023, 7:50am UTC](https://community.hivepress.io/t/make-tiers-required-in-add-listing-form/6861/2 "2023-08-03T07:50:37Z")

</div>

Hi,

Please use this PHP snippet ([How to add custom code snippets - HivePress Help Center](https://help.hivepress.io/article/23-how-to-add-custom-code-snippets)):

```auto
add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		if ( isset( $attributes['price_tiers'] ) ) {
			$attributes['price_tiers']['edit_field']['required'] = true;
		}
 
		return $attributes;
	},
	1000
);

```

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:** ![Yufit](https://community.hivepress.io/user_avatar/community.hivepress.io/yufit/32/4231_2.png) [@Yufit](https://community.hivepress.io/u/Yufit)\
**Post date:** [August 3, 2023, 9:04am UTC](https://community.hivepress.io/t/make-tiers-required-in-add-listing-form/6861/3 "2023-08-03T09:04:16Z")

</div>

Worked beautifully Thank you so much. I used to have it till 20 hours ago, dont know why the star dissapeard, ill update the key. Thank you.

---

<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:** [September 2, 2023, 9:04am UTC](https://community.hivepress.io/t/make-tiers-required-in-add-listing-form/6861/4 "2023-09-02T09:04:43Z")

</div>

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