I had to help with troubleshooting why some custom fields weren't showing up in a form generated by Connections Pro plugin.
I've tried the example in this article. In addition to "cn_metabox" action, I have also tried cn_loaded, wp's init nothing.
I have passed different attributes to the meta boxes so they are public. Nothing worked.
I started thinking if a caching issue was doing some stuff.
Finally, realized it can't and shouldn't be that difficult. I had checked the code and was well written so there had to be a reason.
Then checked the admin area. It turned out that I had to manually approve or make the new field(s) active so they can show up in the form.
I see this as nice feature especially if you want to reorder fields. In other cases I would have expected the field to show up.
I wasted a f*** hour on this. That's why I am writing this for others to learn and also exercising my writing skills so that time doesn't go to waste.
Solution
1) I've created a new plugin in /wp-content/plugins/orbisius-custom-form-fields
2) Customized the example code from this link (i.e. changed ids and title etc.)
>> http://connections-pro.com/2015/06/23/quicktip-custom-field-adding-a-text-field/
3) Activated the plugin
4) Went to WP Admin > Connections > Settings > Forms and then enabled the fields so they show up on the form.
The direct link is:
>> http://yoursite/wp-admin/admin.php?page=connections_settings&tab=form