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.25, csv import, extension, import, meta
- This topic has 5 replies, 3 voices, and was last updated 5 years, 1 month ago by
Steven Zahm.
-
AuthorPosts
-
08/01/2018 at 7:26 pm #468992
paul wagner
ParticipantI successfully used Custom fields instructions to create two meta data fields, Term (e.g. 2018-2019) and spouse, but obviously those don’t come up on the right hand “official” database fields for their destinations. I’m guessing there’s no way to do that without the plugin SayWhat, and reusing another field, right?
Thanks
08/02/2018 at 9:50 am #469052Steven Zahm
Keymaster@ paul
RE: but obviously those don’t come up on the right hand “official” database fields for their destinations.
I’m sorry, I am not sure what you mean by this. The meta is real official database fields. Could you give more details on what you would like to accomplish?
08/02/2018 at 11:18 am #469056paul
GuestSure. After I complete the code snippets
// Register the metabox and fields.
add_action( ‘cn_metabox’, ‘cn_register_custom_metabox_and_text_field’ ); etc
function cncsv_import_meta_fields_options( $fields ) {
/**
- The `key` must absolutely be unique otherwise you may end up overwriting over metadata.
- The ‘CSV File Header Name’ will be the option name shown in the dropdown.
- The CSV header name should match exactly the column header name in the CSV file.
*/
//$fields[‘key’] = ‘CSV File Header Name’;
$fields[‘spouse’] = ‘Spouse’;
$fields[‘term’] = ‘Term’;
return $fields;
}
And these new fields do come up on the source file on the left. But I just see the standard set of fields appear on the right. Should term and spouse be appearing there also?
08/02/2018 at 12:00 pm #469060Steven Zahm
Keymaster@ paul
Yes, they should. If they do not, then your code is likely incorrect. Hard to say without seeing the full code.
fyi, if you are using CSV Import 2.0, the code to actually import the data from the CSV file has changed slightly. The developer docs have been updated on this page. Looks like I still need to update the code example on the custom text field develpoer doc page.
Hope this helps!
08/02/2018 at 4:13 pm #469080paul wagner
Participanthttps://www.screencast.com/t/FGBWxdGFdKKZ
Perhaps this will help clarify my problem. It is only spouse, but even that does not show up in the destination map near the end.
08/02/2018 at 4:39 pm #469082Steven Zahm
Keymaster@ paul
That is because the Code Snippets plugin is deactivating your code. Look at the error message it displays after your save and activate it.
You are declaring a function twice with the same name. You can not do that because that is a fatal error in PHP. Remove one of them and try again. Based on the screencast, I recommend removing the first.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.