On 4/13/07, Tipan <[EMAIL PROTECTED]> wrote: > I am passing a parameter from a template to an inclusion tag {% > show_tag <id> %}. This <id> value is then returned from the inclusion > tag defintion in a dictionary (return {'form':form, 'value':id}) to > render the form for use in a hidden field (<input type="hidden" > name="xyz" value={{ value }}/> > > When I view the html source in the browser it shows a "/" after the > number e.g. "6/" This is also passed to the Form when posted. It's > causing the Form to fail on the is_valid function.
If your hidden input field is exactly like this: <input type="hidden" name="xyz" value={{ value }}/> it would seem to me that the "/" in "/>", which closes out the tag, could be interpreted by the browser as part of the value, rather than part of the HTML tag. I would try putting the value in quotes, and leaving at least one space between the value and the "/" character. Something like this: <input type="hidden" name="xyz" value="{{ value }}" /> would be valid XHTML. If you don't care at all about XML conformance, you could also just get rid of the "/" and have <input type="hidden" name="xyz" value={{ value }}> which is valid HTML, but not XHTML. Regards, Ian Clelland <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---