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

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.

Related

Typo3 Powermail: Export of multiple forms not working - How to add Translations

I have a contact form in different languages. All Forms (1 per language) store their data on a certain page. When I click "Mails" and that storage page, I see a list of all messages from all forms - so far so good.
But when I click CSV Export, I only get the data from one language. After a while of debugging I think I have found the reason - this is because the export service collects the fields from the first message and based on that field list it builds all the other rows. As other messages are from different forms (i.e. languages) there are no corresponding fields for those messages and they are not exported.
Have a look at https://github.com/Intera/typo3-extension-powermail/blob/master/Classes/Domain/Service/ExportService.php --> see function getDefaultFieldListFromFirstMail
Now I am writing to SO instead of Github Bugs, because I still think that there is something wrong with my setup, as Powermail is quite widely used and such an error would have been reported earlier.
The problem was the way I set up the translations of the Powermail forms. I have created a different form for each language, which is not the correct way to do it.
I have found a video which describes the correct process: https://vimeo.com/268654409 .
In the case that the video gets removed, here are some screenshots:
1.) navigate to "LIST" on the the page of your form, select your form and click "Create new Record".
2.) Add a new record "Alternative Page Language"
3.) Select the desired language for the new record and name it properly:
4.) Now you should have a new localization in your powermail fields:
Click on that localization entry to edit / translate it.

laravel backpack - creating related models on the fly

is it possible to have a onepage-form for editing or creating a entry and its related (1 to n) entrys?
For example: I have a customer model, every customer can have unlimited addresses. I could now have a CustomerCrudController and a AdressCrudController with the adress having select2-field for the customer, maybe having some kind of filter for the customer in the adress-list-view but it would be a more fluid working having the ability to change or add adresses in the customers-edit-view.
Thanks
Christin
There is currently no built-in way to do that right now in a Backpack CRUD create/edit form. It's planned, but will not be happening until the next version of Backpack, which might take as long as 3-6 months to launch.
What you could do is:
1) create your own custom field type, say "select_or_create_address";
2) start from the select2 field type and create your custom functionality:
the results should could be loaded with ajax;
a button next to the select could open a popup with the create address form, either:
a quick form you code yourself that inserts a new address in the db;
the AddressCrudController create form (but without the menu, sidebar, etc); for this you'd need to create another method in the AddressCrudController, base off CrudController::create() but loading a different view;
when the address successfully added, the id should be inserted in the select2 as a value;
My recommendation is to go with the quick form, it should be faster to develop and you wouldn't have to resort to solutions like iFrame popups.
Cheers!

Microsoft Access - Why must I be force to use form wizard

Every time I try to create my own form, without using a form wizard base off a table/query, it doesn't seem to work with the subform even thought the forms are connected correctly via master/child links. I tried comparing my dropdownlist/form properties from a wizard version to a custom made. I don't see any difference, why would one work while the other doesn't? am I not seeing something in the background?
Is the form / dropdownlist record source not inter connected in my custom form?
EDIT:
My combo box is now updating the first subform correctly, but it is based off a wizard form. My problem now is getting the subform1 to update subform2. I know I should be creating a new thread. But do you mind taking a quick look. The second subform should be retreiving the ID from subform1 and link it to workOrderID in subform2.
The relationship
Do not be fooled by my workOrder, it is design for only 1 LotNo. However it was originally design for multiple but was change so the user can only enter 1 lot number for 1 work order.
The main form + 2 subform
Subform1 is the first to the top
Subform2 is the bottom one
The links between subform2 and subform1. Subform1 is the first one to the top in the previous picture.

twitter bootstrap autocomplete dropdown / combobox with Knockoutjs

I have a requirement where I HAVE TO use bootstrap autocomplete dropdown, BUT user can have free form text in that dropdown if they wish. Before you think about TypeAhead, I could use Bootstrap TypeAhead textbox, but I need to have the dropdown becasue we want to give some default values as headstart options in case users dont know what to search for.
I am using this with MVC DropDownListFor as that creates a select control for us.
I found this article which does that for me.
https://github.com/danielfarrell/bootstrap-combobox/pull/20
All I had to do was take off the name from the select control and the control was letting me enter free form text. All good so far.
Now, I am using this in conjunction with Knockoutjs. I bind my options and selected value to the select control and then on row rendered of my template, I called (selector).combobox() which makes the select control a bootstrap comobobox and adds an input control and hides the select control in the scenes behind.
The problem now is when I try to get he values to post to server, since the value I put in input box is not a valid options from the options I gave to select control, it is always setting it to the first option by default. This is becasue, I set the binding of the selected value on select control and not on the input box which was created by bootstrap-combobox.js.
My question is how do I get the input box to data-bind to the same porperty as the the select control was bound to.
Any other options??
Let me know if you need more clarification or have questions.
Please suggest.
Thanks.
Have a look at Select2 for Bootstrap. It should be able to do everything you need.
Another good option is Selectize.js. It feels a bit more native to Bootstrap.
Does the basic HTML5 datalist work? It's clean and you don't have to play around with the messy third party code. W3SCHOOL tutorial
The MDN Documentation is very eloquent and features examples.
Select2 for Bootstrap 3 native plugin
https://fk.github.io/select2-bootstrap-css/index.html
this plugin uses select2 jquery plugin
nuget
PM> Install-Package Select2-Bootstrap
Fuel UX combobox has all the features you would expect.
Can i suggest http://www.jqueryscript.net/form/Twitter-Like-Mentions-Auto-Suggesting-Plugin-with-jQuery-Bootstrap-Suggest.html, works more like the twitter post suggestion where it gives you a list of users or topics based on # or # tags,
view demo here: http://www.jqueryscript.net/demo/Twitter-Like-Mentions-Auto-Suggesting-Plugin-with-jQuery-Bootstrap-Suggest/
in this one you can easily change the # and # to anything you want
Bootstrap Tokenfield seems good too: http://sliptree.github.io/bootstrap-tokenfield/

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.