Drop down menu in python form - forms

I have a web2py application and want to create a form where I am able to make a drop down menu, which has several options to choose, which dont come from a database. 1st Is this even possible with web2py and if yes, how would I do that and read out it's value?

Related

VBA to Set All Controls in All Forms

Periodically, my database gets slow and I have to create a new database and import all my forms, etc. into the new database. For some reason, all my form control settings (Access Theme, etc.) gets lost and I have to manually go through every control on every form to reset it to the way I like it.
My question is:
Is there a way to keep all my form control properties and settings when I import them into the new database?
If not, how would I use VBA to do this for me automatically... looping through all the controls on all my forms to set all the properties to the way I like it? And, even more specific, I have a Sample Form with one of each control with all the properties set the way I want. So, how could I open this Sample Form and read each control's properties to copy to all the same controls on all my forms?
Performing a "Compact & Repair Database" action under the file tab will speed up your slow database. So you will not have to export and create a new instance of the database.
Microsoft does a good job of explaining
hope this helps
I Compact and Repair all the time.
I found the answer to my question: When I create a new database and import the forms from my old, slow, database, Access asks if I want to import the Themes along with the forms and, when I check this box, it copies all the forms' formatting, colors, etc. I think you have to click the Advanced button (or something like that) to see this option when you're in the Forms tab.

SYMFONY FORM - filter attribute form on top with submit button, that provides a table with other form used to edit each row details

I am looking for best practices on SYMFONY FORM handling to achieve the following standard page (surprisingly I haven't found anything similar existing yet on SO).
Here is a shema of what I want to achieve:
As you can see at the top there is a SYMFONY FORM to filter the results that should be displayed.
It displays a table and each tuple of the table should permit to open another SYMFONY FORM kind linked to the tuple.
I am in the process of learning SYMFONY FORM, so far, I can manage to create the top row FORM to set the filter that'll apply to the table display.
But I wonder if anyone has experience on the second part: Displaying the table that embed as well many forms of a similar kind -That seems a bit more complex. I read about TWIG.EXTENSION and FORM.COLLECTION, I'll investigate that. But if someone could save me to re-invent the wheel and lead me to some direct shortcut, I'd be really grateful.
No idea if it's the best practice, but one way to do it would be to create a new property for your entity being listed in this table, called $editionForm (without mapping it to the database) for example.
Then, either throught a custom loop or by listening to a doctrine (or any ORM you use) hydration event (or triggering such an event if you don't use any ORM), fill the property with the generated form, probably within a dedicated service.
Then, just use it in your template like this :
$entity->getEditionForm()->render()

Is it possible to add a combobox as column in a listbox in VBA?

Using a VBA form, is it possible to add a Listbox control that has columns which contain Combo box controls?
No not possible with Standard VBA; Standard VBA will not allow this! You may be able to create a custom ActivX control or load another 3rd party control as suggested elsewhere but a standard ListBox cannot hold a ComboBox.
Other Workarounds may be usable if you can provide more details...
If you insist in doing that using User Forms, the only way is that when you click a list item, it should pop a different form containing the combo box, it will be too much work to create and difficult to maintain.
I am sure with spreadsheet itself you can come up with better solutions. I am still not sure what ultimately you want to achieve, but to me this is just a dependent list so you can use sth like this in the spreadsheet itself:
http://www.contextures.com/xlDataVal02.html

can't change options of a select element in a drupal web form

Im new to drupal. I had created web form with few elements and two select boxes. All went well. that was last week.
Now, I want to change the values, and strangely I can't see list of Values anywhere in the form component page. I can't even see how to create a new selectbox and give new options.
I think I kill some module responsible for this. Im not sure.
FCKEditor is installed, if that helps.
screenshot: http://twitpic.com/2sqytr
If you go to the node, you should see a Webform tab, if you click that you should go to the overview of the webform form, where you can edit existing form fields and add new ones.

Programmatically creating menu hierarchy in Joomla

Let's say that I have a vast quantity of restaurant reviews in a database -- not Joomla articles, just database tables. I want to display these restaurant reviews as part of a Joomla 1.5 web site.
I can write a component to display each review. That part is fine. But rather than listing the reviews as a list on a page, I want to use the nice cascading menu that is part of the Joomla template that the site uses. But I don't want to have to add menu items one by one for each review; I want menu items to be generated automatically from the database contents. The menu of reviews should 'plug in' the existing menu structure for the web site (i.e., I want to supply the code that generates the menu items with an existing menu item so that it generates itself under that item).
How can I create code to programmatically create that menu? Component, plug-in, module, ...? Would the menu be generated at page display time, or "manually" in the admin panel (I'm ok either way). Any examples of this already?
I think the simplest way would be to create a custom menu module. The absolute basic one would just output the list of reviews in a <ul> and then use some css to style the list.
I ended up creating a component that creates the whole menu structure at once, upon admin request. It just creates rows in the jos_menu table, as if the menus were created manually. Updating the hierachy is a pain (and I haven't completed that part), but creating the structure from scratch is pretty simple and works well.