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.11, custom field
- This topic has 1 reply, 2 voices, and was last updated 8 years, 6 months ago by
Steven Zahm.
-
AuthorPosts
-
02/07/2018 at 3:07 am #450332
Kathleen Shykula
ParticipantHi,
Have been playing around with ways to add a custom field. Tried code snippets…not entirely happy with results; have not worked through right to the part about editing the template in my child theme. Odd thing with this method. when I deactivate my snippet…the resulting field and data appear on the contact screen the customer sees. When I activate the snippet – the opposite happens… the field and data disappear. So – I tried adding a custom field in the data entry screen. Simple. Works – and displays the field and data in the contact screen my customers see, but the words “Custom field” display as a heading and my custom field name and resulting data appear in a bulleted list. See attached. How can I make this look better? Will your instructions for importing into a custom field work with fields created in this manner?
Thanks!
Attachments:
You must be logged in to view attached files.02/07/2018 at 9:45 am #450375Steven Zahm
Keymaster@ Kathleen
RE: Tried code snippets…not entirely happy with results; have not worked through right to the part about editing the template
I recommend following the tutorial on editing the template to show your custom text field.
RE: Odd thing with this method. when I deactivate my snippet…the resulting field and data appear on the contact screen the customer sees. When I activate the snippet – the opposite happens… the field and data disappear. So – I tried adding a custom field in the data entry screen. Simple. Works – and displays the field and data in the contact screen my customers see, but the words “Custom field” display as a heading and my custom field name and resulting data appear in a bulleted list.
Apologies for the confusion! It stems from core WordPress terminology. The “custom field” you added is different from the “Custom Fields” metabox (with the drop down). I’ll try to explain…
Take a look at your add WordPress Page/Post, you will also find the “Custom Fields” metabox… and, very likely, you’ll have custom fields added by the theme and other plugins. The custom field you added following the tutorial adds new custom field like the theme and plugins added fields to the WordPress page/post admin page.
So…
The custom field you added by following the tutorial will display as its own metabox as its own input just as they do when the theme or plugin adds a custom field to the WordPress page/post page.
Just like WordPress, Connections stores the data from the “Custom Fields” metabox in the same place as custom fields. So yes, you can have data show up in the “Custom Fields” metabox when the snippet is deactivated and have it disappear when it is active. This is to ensure the custom data is not lost when editing when the custom field is not activate. The exact same will happen if you change WordPress themes or deactivate plugins which add custom fields to the WordPress post/page admin pages. Unless the theme/plugin registered the custom field as “private” but that is a whole other topic best left shelved for now.
I hope this makes sense!
RE: How can I make this look better?
Well, my suggestion would be to follow through with the tutorial and edit the template. That way you can add you own header text and label (if you want). And then you can also control exact where you want it to be displayed by putting the code in that spot in the template.
RE: Will your instructions for importing into a custom field work with fields created in this manner?
The tutorial does cover how to make the custom field available to import and export with a CSV file.
This is pretty advanced if you have little experience with PHP. I do offer custom development services if you need it. Contact me using the link at the very bottom of the page.
Hope this helps!
-
AuthorPosts
- You must be logged in to reply to this topic.
