form-fields

Conditionally skip form fields from submission, Reduce URL clutter

I have multiple hidden form fields which store values about the the current view (e.g. if certain, normally hidden div's are visible etc.) to restore the layout when the form posts back. The problem is that I'm always submitting all these hidden fields, even if they are in default, generating lots of unnecessary URL clutter in the proce...

SmartyPants-PHP not working for string's submitted by post/get?

Finally gave up on my own pretty-quotes function to use SmartyPants-PHP's one-stop SmartyPants() ... except it seems that it doesn't do pretty curly-quotes (just straight quotes) for strings submitted from post forms or get url's. Tested curly quotes to show with SmartyPants on a string defined in the same doc. Replace that string with ...

Using Javascript to Open a New Page and Populate Form Values There

I am using JavaScript in a bookmarklet to populate form elements on a website: javascript:var f = document.forms[0]; f.getElementsByTagName('input')[0].value = 'myname'; f.getElementsByTagName('input')[1].value = 'mypassword'; f.getElementsByTagName('input')[2].click This works. However what I would like to create is a bookmarklet so ...

How can you manually render a form field with its initial value set?

I'm trying to render a form's fields manually so that my designer colleagues could manipulate the input elements within the HTML instead of struggling in Python source. ie. Instead of declaring form fields like this... {{ form.first_name }} .. I actually do ... <label for="id_first_name">Your name:</label>...