Problem:
Before I created meta-boxes I did things the old fashion way by entering custom fields directly. I went through the process of filling in the ID and the Value by hand and hitting the "update button". I would input whatever I wanted, spaces
and .
(periods) and they would be correctly applied in my database (ERROR FREE). However I no longer want to do this manually which is why I have created meta-boxes, but since I began using them, special characters like .
and spaces
wont take, resulting in a blank field when I attempt to update the post in order to save the meta-box values. What am I missing and why do the rules for special characters differ when you manually enter the ID as opposed to having it preset through meta-boxes. Ultimately how can I create meta-box array ID's with special characters?
Note: All my non-special character meta-boxes function properly. So the problem is NOT in the functionality of the code
Details:
I am using the mp3 player plugin "mp3-jplayer" which uses custom fields to display audio. The custom field format (which the creator of this plugin determined and I cannot change myself) is...
ID = TrackNumber mp3.Artist
(note the space and the period above, this is what trips up the submission of the metabox value)
Value = SongTitle@SongURL
At the moment I am using meta-boxes to input custom fields as follows:
$meta_boxes[] = array(
'id' => 'musicboxes',
'title' => 'Music Box Head',
'pages' => array('post'),
'context' => 'normal',
'priority' => 'low',
'fields' => array(
array(
'name' => 'Musicbox 1',
'desc' => 'ID',
'id' => '1 mp3.Artist',
'type' => 'text',
'std' => '',
)
)
);
However, when I input in the array ID field "1 mp3.Artist" the custom field does not update correctly (in other words, remains blank) and I'm thinking it's because there is a space between the number and the word "mp3". So how would I (if its possible) still be able to keep the space so that the custom field functions properly with the mp3-jplayer plugin.