0

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?

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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