The .components attribute of the helper is a Python list, so you can use all the standard list methods, such as .extend():
wrapper.components.extend([new_component_1, new_component_2, new_component_3 , new_component_4]) Perhaps we should add an .extend() method directly to the helpers, as we already have .append() and .insert(). Anthony On Thursday, May 23, 2013 5:49:34 PM UTC-4, Ian W. Scott wrote: > > Is there a way to append multiple components to an HTML helper in a single > append() call, or do we have to use a separate append() call for each > component? > > I'm trying to append four components to a SPAN helper held in the variable > "wrapper." I've tried it this way: > > wrapper.append(new_component_1, new_component_2, new_component_3, > new_component_4) > > But the append() function seems to want only one argument. The code above > raises an error, saying that I've submitted too many arguments. > > Thanks! > > -- --- 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/groups/opt_out.