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.16
- This topic has 10 replies, 2 voices, and was last updated 8 years, 4 months ago by
Steven Zahm.
-
AuthorPosts
-
04/04/2018 at 10:50 am #457764
Robert Granlund
ParticipantIs there a way to add core fields via functions.php or a custom plugin. There are fields that we need that are not included in the core fields and we need to map to them when we do a CSV import.
Thanks with all of the support so far.
04/04/2018 at 11:22 am #457770Steven Zahm
Keymaster@ Robert
What exactly are you trying to add that cannot be accomplished by using custom fields? What you are asking for is akin to wanting to add new “core” fields to a WordPress post… you can not unless you edit the core WordPress files which means you would not be able to update WordPress. This is why WordPress allows one to add custom fields.
This is the same with Connections… you can add custom fields and they can be imported/exported via CSV file if they are registered to do so.
04/04/2018 at 12:18 pm #457781Robert Granlund
ParticipantThanks Steven. I understand now. I appreciate your help! We are using the plugin to help track sales data in addition to just the contact.
04/04/2018 at 12:34 pm #457783Steven Zahm
Keymaster@ Robert
That sound like you could you could use the custom fields with no issue. Depending on what you are tracking the data could be better served by storing it in a separate table. You would have to tackle that bit on your own … you would still be able to integrate with with Connections but that definitely would be more coding than using custom fields.
04/04/2018 at 1:02 pm #457806Robert Granlund
ParticipantThanks this really helps. The article I read answered all questions.
04/04/2018 at 2:05 pm #457807Robert Granlund
ParticipantOn Forms, Add New Contact, is there a way to auto-populate the category? Also, is there a hook to change the name/title of Category to some unique to our operation?
04/05/2018 at 9:28 am #457975Steven Zahm
Keymaster@ Robert
RE: On Forms, Add New Contact, is there a way to auto-populate the category?
Only if you edit the PHP file for it. Locate these lines (1846–1860) in the
connections_form.phpfile.$out = cnTemplatePart::category( array( 'name' => 'entry_category', 'style' => array( 'width' => '100%' ), 'type' => 'multiselect', 'return' => TRUE, 'select_all' => '', 'exclude' => $metabox['atts']['exclude'], 'include' => $metabox['atts']['include'], 'group' => $metabox['atts']['group'], 'child_of' => $metabox['atts']['child_of'], 'hide_empty' => $metabox['atts']['hide_empty'], 'show_count' => $metabox['atts']['show_count'], ) );Change them to:
$out = cnTemplatePart::category( array( 'name' => 'entry_category', 'style' => array( 'width' => '100%' ), 'type' => 'multiselect', 'return' => TRUE, 'select_all' => '', 'exclude' => $metabox['atts']['exclude'], 'include' => $metabox['atts']['include'], 'group' => $metabox['atts']['group'], 'child_of' => $metabox['atts']['child_of'], 'hide_empty' => $metabox['atts']['hide_empty'], 'show_count' => $metabox['atts']['show_count'], ), 'X,Y,Z' );Where
X,Y,Zis change it to the category IDs (their number) that you want preselected.RE: is there a hook to change the name/title of Category to some unique to our operation?
You can hook into the
cn_pre_insert_termfilter. It provides the term name that will be added. YOu will need to return your altered string after your operation.Hope this helps!
04/05/2018 at 10:44 am #457979Robert Granlund
ParticipantSteven, thank you for answering all of my questions. I appreciate it. IS there a hook for the function in connections_form.php? I can probably figure it out. I tried to do using jQuery to edit the code on load with
$('li:contains("Robert Granlund")').removeClass('active-result');
$('li:contains("Robert Granlund")').addClass('result-selected');
But to no avail.04/05/2018 at 11:02 am #457982Steven Zahm
Keymaster@ Robert
RE: IS there a hook for the function in connections_form.php?
Sorry, no hook. If there was, I would have let you know vs having to edit the PHP file ;)
04/05/2018 at 2:45 pm #458009Robert Granlund
Participant“You can hook into the cn_pre_insert_term filter.”
I want to change Category to ‘Sales Manager” is this the correct example I should follow?
https://developer.wordpress.org/reference/functions/wp_insert_term/
I am using the Form Plugin so a contact can be added on the front end. I have attached an imageAttachments:
You must be logged in to view attached files. -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
