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.
- This topic has 5 replies, 2 voices, and was last updated 10 years, 2 months ago by
Steven Zahm.
-
AuthorPosts
-
03/04/2013 at 12:29 pm #252907
johan
ParticipantI am adding a new Metabox which accepts a number of blocks of data. I am close but can’t figure out where data-type is defined. Help please?
Like data-type=”email” in this:
‘<p class=”add”><a href=”#” class=”cn-add cn-button button” data-type=”email” data-container=”email-addresses”>’ , __( ‘Add Email Address’, ‘connections’ ) , ‘</a></p>’;
03/04/2013 at 12:45 pm #252909Steven Zahm
Keymaster@ johan
That can be defined as anything you want it to be. See this:
http://html5doctor.com/html5-custom-data-attributes/03/05/2013 at 3:12 am #252995johan
ParticipantThanks Steven that gives me the background but I need to know where the specific data-type “email” or “addresses” is defined in your code. Is if in one of the .php files? Is it in a .css file? Which one please?
I also read in that link that IE does not support it. Is that still true?
03/05/2013 at 3:41 am #252997johan
ParticipantI am trying to create a new data-type by following your example.
Following are two lines of code taken from line 1815 of class.form.php. They pretty much sum up my problem.
I had it working in a previous version when you used this:
echo ‘<p class=”add”><a id=”add_phone_number” class=”button”>Add Phone Number</a></p>’;
but now that you are using data-type I am a bit confused:
echo ‘<p class=”add”><a href=”#” class=”cn-add cn-button button” data-type=”phone” data-container=”phone-numbers”>’ , __( ‘Add Phone Number’, ‘connections’ ) , ‘</a></p>’;
03/05/2013 at 5:11 am #253007johan
ParticipantThat line number is after some lines of my own code have been added so will not match any version you have.
03/07/2013 at 9:31 am #253280Steven Zahm
Keymaster@ johan
Ok, you your changing this so when you click the Add button it’ll show another row to add data correct? If that is that case, using the phone number code in class.form.php as the example, towards the top, you’re see a text area with id=’phone-template’ the data-type and that ID need to match. Like so: data-type=’new’ the textarea will have to be id=’new-template’
I hope that helps.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.