I'll preface this by saying that I am asking for information, not a coding solution. At this point, it is unclear to me why EllisLab would intentionally do this.
I'm creating an edit form for a channel entry. Inside my {exp:channel:form}
loop, which works, I try to output a date variable with specific formatting.
When I output the date variable once with a format parameter...
{p_date_available format="%Y-%m-%d"}
...the variable is not parsed on the front-end. However, if I place the date variable in my template twice, once without the format parameter and once with the format parameter, my problem is solved. Placement of these two instances of the variable is irrelevant.
Can anyone provide an explanation as to why the channel form tag does this?
EDIT: Here is a snippet of the code for understanding the parse order:
{exp:channel:form channel="product" class="styled-form" return="dashboard" datepicker="no" url_title="{segment_3}" require_entry="yes"}
{exp:store:product entry_id="{entry_id}"}
<input type="date" id="p_date_available" name="p_date_available" value="{p_date_available format="%Y-%m-%d"}" required/>
<!-- put here to force EE parsing of formatted date variable-->
<input type="hidden" value="{p_date_available}"/>
{/exp:store:product}
{/exp:channel:form}
exp:channel:form
syntax? I ask as I'm trying to work out if this might be a parsing order issue. I'nm also curious are you trying to put the formatted date into a value attribute on your form, or otherwise trying to show it in a message or something?? With an example I can easily run it up in my sandbox and see...