Hey @a4jpcom – Thanks for reaching out!
Thanks for your suggestion on the feature that we can work on. Regarding your first question, I apologize as customizations like sorting by URL/slug are outside of our scope for support. In case you’d like to look into custom development options, we highly recommend using Codeable.
About your second question, you can consider taking a look at our developer doc here.
Thanks!
Hey @a4jpcom – We haven’t heard back from you since my previous message, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
Hey @a4jpcom – I looked into the message I posted initially and seems that I missed including the link to the related resources. I apologize for that, and you can take a look at our doc here and here. I hope this helps you to get started as beyond this it would fall outside the scope of support we can offer.
Kindly,
Hey @a4jpcom – I hope you got a chance to checkout the resources I shared. Please feel free to reachout if you have any questions about WPForms lite.
Kindly,
Hi @a4jpcom,
We haven’t heard back from you in about a few weeks, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
Hi @a4jpcom,
I just thought I would chime in here and check if you still need help with this. I believe that you asked a similar question a month ago and we shared the following code which should be able to address the extra sorting that you need:
/**
* Add custom CSS classnames to dynamic choices.
*
* @param array $properties Properties for rendering the field on the frontend.
* @param array $field Original field data.
* @param array $form_data Form data.
*
* @return array
*/
function wpforms_add_dynamic_choices_ids( $properties, $field, $form_data ) {
// Exit early if Dynamic Choices is not enabled.
if ( empty( $field['dynamic_choices'] ) ) {
return $properties;
}
// Get the prefix (post, page, category, post_tag, your_custom_post_type, your_custom_taxonomy).
$prefix = $field[ 'dynamic_' . $field['dynamic_choices'] ];
// Loop through all choices.
foreach ( $properties['inputs'] as $index => $input ) {
// Combine dynamic prefix with the real item (post, category etc) ID.
$class_name = $prefix . '-' . $input['attr']['value'];
// Add to list of choice item container classes.
$properties['inputs'][ $index ]['container']['class'][] = $class_name;
}
return $properties;
}
add_filter( 'wpforms_field_properties_checkbox', 'wpforms_add_dynamic_choices_ids', 10, 3 );
add_filter( 'wpforms_field_properties_radio', 'wpforms_add_dynamic_choices_ids', 10, 3 );
Please let us know if we are missing something.
Thanks!