• Resolved Chris Dillon

    (@cdillon27)


    Please provide an option or filter to disable sorting of custom fields. In my case, alphabetical does not make sense and it breaks the flow of my ticket form.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    You can use the wpas_get_custom_fields filter to reorder the custom fields array before its rendered on the front end.

    Thanks.

    Thread Starter Chris Dillon

    (@cdillon27)

    That worked before v5 but now they are sorted after that filter is applied.

    class-custom-fields.php:L353-354:

    $fields = $this->get_custom_fields();
    $fields = $this->sort_custom_fields( $fields ) ;
    Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    Yes, there’s a new attribute on each custom field called ‘order’. You can set that attribute in your wpas_get_custom_fields filter function and the sort_custom_fields function will then sort the fields in that order before displaying them.

    Thanks.

    Thread Starter Chris Dillon

    (@cdillon27)

    Thank you.

    paulovsky

    (@paulovsky)

    Can you please update your documentation on how to use the attribute?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom fields order’ is closed to new replies.