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.
Tagged: 8.1.5, cn_address_options, code snippets, filter, form
- This topic has 2 replies, 2 voices, and was last updated 8 years, 5 months ago by
dominic loiacono.
-
AuthorPosts
-
12/30/2014 at 12:22 pm #313690
dominic loiacono
ParticipantHi again,
It would be great to be able to disable social networks and address types and even email types. I managed to do this by commenting out some lines in class.options.php. but i will loose these changes when updating connections.
This feature is particularly beneficial for the form extension where the public is able to input data.
I know you mentioned in a previous post that people do not tend to submit info they do not want to share, I agree with hat statement, but making it easier and less demanding (fewer visible choices) can make users want to fill out the form more readily.
If i use the snippets plugin and insert my changed function, will that override the original function?
public function getDefaultAddressValues() { $options = array( 'home' => __( 'Home' , 'connections' ), //'work' => __( 'Work' , 'connections' ), //'school' => __( 'School' , 'connections' ), //'other' => __( 'Other' , 'connections' ) ); return apply_filters( 'cn_address_options', $options ); }
Thanks again for great plugin.
dom
01/01/2015 at 10:23 am #313852Steven Zahm
Keymaster@ dominic
You can use the Code Snippets plugin and a filter so you do not lose the changes when updating. This should do it:
add_filter( ‘cn_address_options’, ‘cn_address_options’ );
function cn_address_options( $options ) {
unset( $options[‘work’] );
unset( $options[‘school’] );
unset( $options[‘other’] );return $options;
}Following the same structure will work for the social media option too.
Hope that helps!
01/06/2015 at 1:44 pm #314144dominic loiacono
ParticipantWorked like a charm.
Thanks.
-
AuthorPosts
You must be logged in to reply to this topic.