Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 4 replies, 2 voices, and was last updated 10 years ago by
Jana.
-
AuthorPosts
-
08/11/2016 at 12:49 am #386215
Jana
ParticipantFirstly, congratulations on a great product suite and website. Clearly a lot of thought and effort has gone into the software, documentation and systems. It’s refreshing to see something so well done.
Is it possible to disable the “County” field on the input Form? In Australia, we don’t use County or District, and it is confusing to the user.
Ideally, I’d like to keep District but move the prompt for District to be either above or below the other address fields (as it is not used as part of the address in this country).
I’ve got a little coding knowledge.
Thanks and regards
08/11/2016 at 11:20 am #386245Steven Zahm
Keymaster@ Jana
Sorry, no, there is no easy way to remove the field. What you could do since you have some coding knowledge is unregister the default address field set and register you own custom fieldset.
To unregister the core address fieldset use this:
function cn_remove_address_metabox() { cnMetaboxAPI::remove('address'); } add_action( 'cn_metabox', 'cn_remove_address_metabox', 9 );To register you custom address fieldset use:
function cn_custom_address_fieldset() { if ( is_admin() ) { $pageHooks = apply_filters( 'cn_admin_default_metabox_page_hooks', array( 'connections_page_connections_add', 'connections_page_connections_manage' ) ); // Define the core pages and use them by default if no page where defined. // Check if doing AJAX because the page hooks are not defined when doing an AJAX request which cause undefined property errors. $pages = defined('DOING_AJAX') && DOING_AJAX ? array() : $pageHooks; } else { $pages = array( 'public' ); } $field = array( 'id' => 'metabox-address', 'title' => __( 'Addresses', 'connections' ), 'pages' => $pages, 'context' => 'normal', 'priority' => 'core', 'callback' => '{REPLACE WITH YOUR CUSTOM FUNCTION NAME}', ); cnMetaboxAPI::add( $field ); } add_action( 'cn_metabox', 'cn_custom_address_fieldset', 9 );Notice the
{REPLACE WITH YOUR CUSTOM FUNCTION NAME}in the above code, you will have to replace that with you own function name for your custom address fieldset.You can copy the code from Connections and alter it as needed to remove the country field and move the district field. it is this code that you would place in your own custom functions:
- https://github.com/Connections-Business-Directory/Connections/blob/8.5.20/includes/class.metabox-entry.php#L966
- https://github.com/Connections-Business-Directory/Connections/blob/8.5.20/includes/class.metabox-entry.php#L1009
Hope that helps!
08/11/2016 at 5:50 pm #386290Jana
ParticipantHi Steven
I see why you get such excellent reviews on WordPress for your level of support! Thank you for such a comprehensive and helpful reply. I will try it out.
08/11/2016 at 8:50 pm #386298Steven Zahm
Keymaster@ Jana
Thanks! If you have a moment I would truly appreciate a review as they really do make a difference. Many thanks in advance!
https://wordpress.org/support/view/plugin-reviews/connections
08/11/2016 at 10:07 pm #386301Jana
ParticipantHappy to do so :)
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
