I don't think I've seen any such tools. In general, it is not very common to create large static sections of the DOM using the web2py HTML helpers. They are more useful when you need to generate DOM programmatically (e.g., input some form configuration parameters and automatically produce a form DOM, such as how SQLFORM works) -- in that case, though, you would be writing a function to generate the DOM, not merely parsing some existing HTML and converting it to web2py helper code.
What exactly are you trying to achieve? Why do you want to convert that HTML markup to web2py helper code? Note, if you just want to parse some existing HTML into a helper *object *that can then be manipulated (rather than producing actual helper *code*), you can use the parsing functionality of the TAG helper as described here: http://web2py.com/books/default/chapter/29/05/the-views#Parsing Anthony On Monday, July 13, 2015 at 9:20:48 AM UTC-4, LoveWeb2py wrote: > > Hi Stifan, > > Thank you for replying. Do you know if there is anything that converts > forms automatically? I'd think there would be something to do this by now? > > On Monday, July 13, 2015 at 7:46:32 AM UTC-4, LoveWeb2py wrote: >> >> Hello, >> >> Is there something within web2py that automatically converts html forms >> to html HELPER SYNTAX? >> >> for example here is my form: >> <div id="checkout-area" style="display: none;"> >> <h4><i class="icon-shopping-cart"></i> Secure Checkout</h4> >> <script type="text/javascript" src="https://js.stripe.com/v2/ >> "></script> >> <div id="checkout-form" style="display: none;"> >> <form id="CardForm"> >> <div class="control-group"> >> <label>Cardholder Name</label> >> <input id="CardName"> >> <span class="help-inline"></span> >> </div> >> >> <div class="control-group"> >> <label>Address</label> >> <input id="address"> >> <span class="help-inline"></span> >> </div> >> >> <div class="control-group"> >> <label>City</label> >> <input id="city"> >> <span class="help-inline"></span> >> </div> >> >> <div class="control-group"> >> <label>State</label> >> <input id="state"> >> <span class="help-inline"></span> >> </div> >> >> <div class="control-group"> >> <label>Zip Code</label> >> <input id="zip"> >> <span class="help-inline"></span> >> </div> >> >> <div id="div-card" class="control-group"> >> <label>Card Number</label> >> <input id="CardNumber" placeholder="4242424242424242"/> >> <span id="span-card" class="help-inline"></span> >> </div> >> >> <div id="div-exp" class="control-group"> >> <label>Expiration</label> >> <input id="CardExpiration" placeholder="12/2013"/> >> <span id="span-exp" class="help-inline"></span> >> </div> >> >> <div id="div-cvc" class="control-group"> >> <label>CVC Code</label> >> <input id="CardCVC" placeholder="123"/> >> <span id="span-cvc" class="help-inline"></span> >> </div> >> >> <div class="form-actions"> >> <button type="submit" class="btn >> btn-primary">Submit</button> >> </div> >> </form> >> </div> >> >> and I want to convert it something like this: >> DIV(H4(I(_class='icon-shopping-cart')), _id="checkout_area", >> _style="display: none;" >> ) >> >> What is the most efficient way to do this? >> > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.