Hi Anthony, I would prefer the last option to replace the upload element. But even after reading "Server-side DOM and parsing" a few times I am unable to comprehend it. I guess we would like to replace <input class="upload input-file" id="logs_db_log_file" name="log_file" type="file"> with <input class="filestyle" id="logs_db_log_file" name="log_file" type="file" data-buttonName="btn-primary"data-buttonBefore="true" data-placeholder="Select a Support Bundle" data-size="nr">
It would be kind of you to just give me an example of the code. Thanks a Lot. On Wednesday, December 16, 2015 at 8:47:59 AM UTC+5:30, Anthony wrote: > > But how are you generating the form HTML? Are you doing it all manually? > If so, I suppose your problem is that you have hard-coded the formkey, > which actually changes on every page load. > > Note, you can get the formkey dynamically via form.formkey. You can also > get the whole div that includes the formkey and formname hidden fields via > form.hidden_fields(). Finally, you can get the hidden fields div plus the > closing </form> tag via form.custom.end. > > Also, rather than generating all of the HTML manually, you can create a > custom formstyle or use the method described here > <http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms> > . > > Finally, note that if you only need to change a single element in the > form, you can use server-side DOM manipulation > <http://web2py.com/books/default/chapter/29/05/the-views#Server-side-DOM-and-parsing> > : > > form.element('input#log_db_log_file').update(...) > > Anthony > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

