Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've been going Bananas with this problem for hours trying to figure out what is wrong.

I have this code, simple enough and used in a similar manner many times before:

<?php 

    //  Get the field: on_the_map
    $mb->the_field('date_calendar_item_not_available'); 
?>  
<input type="hidden" id="date_calendar_item_not_available" value="<?php echo (!$mb->is_value('') && !$mb->is_value('NONE')) ? $mb->get_the_value() : 'NONE'; ?>" name="<?php $mb->the_name(); ?>">

Here's the issue, on this one particular WPAlchemy field. The value isn't set into the field even though there is a string of information there, such as:

'2013-01-18,2013-01-23,2013-01-24'

E.g:

<input type="hidden" id="date_calendar_item_not_available" value="" name="_WPAlchemy_Suppliers_Supplier_Details[date_calendar_item_provisionally_booked]">  

Now if I follow that hidden field with an identical one the value is output to the second field.

<input type="hidden" id="date_calendar_item_not_available" value="" name="_WPAlchemy_Suppliers_Supplier_Details[date_calendar_item_provisionally_booked]">
<input type="hidden" id="date_calendar_item_not_available" value="2013-01-18,2013-01-23,2013-01-24" name="_WPAlchemy_Suppliers_Supplier_Details[date_calendar_item_provisionally_booked]">

I would like to mention that this may not be a WPAlchemy issue but maybe something I am doing wrong, or maybe something else entirely, as for some reason in Internet Explorer the value is output, but in the other browsers it isn't i.e. Chrome, Firefox and Safari.

Am I making a stupid markup mistake?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

All I can say is when strange, WTF, moments happen like this, check your white-space or more appropriately 'delete' it.

There was obviously a ASCII char that I couldn't see mucking the whole thing.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.