I'm having problems displaying the multiselect widget inside components. I have 
two actions which do the same thing, basically give us a list of tags, with 
which to select our multiple tags:

### Model

staff_tags=['this', 'is', 'a', 'tag']

db.define_table('test_tagging',
    Field('tags', 'list:string', requires=IS_IN_SET(staff_tags, multiple=True)),
    Field('time_reference', 'time'),
    )

### Controller

def index():

    form=crud.create(db.test_tagging) 

return dict( form=form) 

def test():

    form=crud.create(db.test_tagging)

    return dict(form=form)

### View

{{extend 'layout.html'}}
<h1>Did You Know?</h1>
<p>that when you load a component (like below), you lose the jquery.multiselect 
formatting<br />
Check the 'tags' field for an illustration of what I mean...</p>
{{=LOAD('incident_reports/test.load', ajax=True)}}
<hr width="70%">
<h2>This, however, is a form NOT in a LOAD() function</h2>
<p>As you can see, we get a nice multiselect option here</p>
{{if form:}}
{{=form}}
{{pass}}

However, when you display the form, it looks like this: 

<https://lh5.googleusercontent.com/-JMTTedPrNcI/TiOYuZ8MBqI/AAAAAAAABJk/0N2i81A07RM/screenie.jpg>

As you can see, the lower multi-select is working as expected, however the 
LOAD-ed component version is stripped of all niceness.

Any suggestions?

Reply via email to