Request attributes can't be re-ordered

We created attributes on requests, and tried (a) leaving the order of all new attributes = 0, (b) changing the order of attributes eg 1,2,3,4.
No matter what, the new attributes appear at the top of the request, making the request unusable.

Steps to reproduce

add new attributes to Requests, of any field type eg text, upload, number

Actual result

attributes appear at the top of the page.

Expected result

attributes should appear at the bottom of the page, after the standard text field, and should be in the order specified by the user

Extra details

Thanks for the details. This Order number defines the attribute order within the attribute display area, not the whole page layout - for example, if there are 2 attributes within a group you can define their order this way (which attribute is the first and which is the second). If you mean moving attributes within the page layout (e.g. under the description) this would require code customizations or overriding the request template in HivePress/Templates section (this feature is in Beta).

Thanks Yevhen, any idea why my custom attributes are appearing before the hivepress standard HTML field? this is the problem to solve, as this is not desired. thank you

In ExpertHive theme attributes appear above the request description Need a few electrical repairs – ExpertHive
If you want to move these below please try this code snippet

add_filter(
	'hivepress/v1/templates/request_view_page',
	function( $template ) {
		return hivepress()->helper->merge_trees(
			$template,
			[
				'blocks' => [
					'request_attributes_secondary' => [
						'_order' => 51,
					],
				],
			]
		);
	},
	1000
);

Thanks Yevhen. I haven’t written code in 20 years, because I don’t want to. I’m a business user now and I took expert hive so I wouldn’t have to open up code :). I’m looking for a UI solution where I can properly specify the order of fields, and change them when I need to over time, as business needs change. Custom code = risk with every upgrade. thanks

If you mean reordering them within the attribute area please edit any attribute and set a custom number in the Order field (it defines the attribute priority), this doesn’t require any code snippets. Sorry for the inconvenience, we plan to create a UX solution for as many possible customizations as possible, but if something is not possible yet we try to prove a code snippet as a workaround. If you keep custom code snippets outside of the theme or plugin folders, they will be safe from updates.

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