Layout Designer - Drag and Drop in PHP - php

I would like to build a Layout designer in PHP or would like to use a readymade script( even if it is a paid one )
Basically I would like to create a sort of Layout where users could choose fields to add from a "field chooser". Each field could be of any type... and we would like to provide a field group too, where the user could choose the number of columns, and make the columns of this "panel" droppable.
We should drag a field from a list, and drop the field to a placeholder on a Form (Panel?).
Finally, is it possible to "read" the form layout in order to store it for later use?
thanks
kabir

Yes there is a Drag and drop form/window designer for PHP - since 2007 the Delphi PHP IDE. It is now become part of the RADPHP X2 IDE available from Embarcadero. Both use the Delphi VCL framework.

There is RADPHP from Embarcadero technologies. It uses vcl for php framework for visual design. You can drag & drop while designing the page. But the html code it produces is not compatible with w3 standards.

Drag and drop isn't available in PHP. PHP is a server-side language; what you're asking for in client-side and would be accomplished using something like JavaScript. You would then use PHP to read the user's choices based on an event occuring, i.e. an item dropped or the user click a confirmation button.

Related

Can we have Multiple select in a dropdown in Zend

Any body have an idea how to have a multiple select in a drop down box in Zend framework.
Is it possible to do that user can have more than once selection in a drop down?
How we can do that in Zend form?
I will appreciate if any have knows this issue
I think Zend Framework doesn't have such option, but you can transform regular multiple select to a dropdown.
Try this plugin for regular multiselect
i don't think you can select multiples in a drop down box, But you can try.. Multiselect
Are you able to do it in a standard html page? (i.e without using zend just a normal html page).
I dont think that there is such an option to have a drop down with multi select in the standard html(dont know about HTML 5 though :) ).
So if the functionality is not available in the language of representation(HTML) itself, I dont think a that a server side framework can provide such a feature. (please enlighten me if I am wrong)
And yes you can do it on the client side for sure(javascript) as mentioned by divide by zero.

Table Filtering with dropdown menu with jqGrid and php

I just wondering if i can create something similar to this but with javascript code cause i don't wanna buy the whole Jgrid php library.
I talk about the 4th column (drop down menu filter).
I have just create the first grid as they say here
Also i read some similar questions here but the most of them are based on ASP .net
If this can be achieved please give me some hints..
Thanks in advance.
What you need is just toolbar searching together with the common searching configuration. All the feature exists in the free open source version of jqGrid. Look at the demo. I hope it does what you need.

jQuery and PHP suggested answers

Hey guys, there is a form where the user select some of his friends and I'm curious on how I can implement a list that searches simultaneously while the user is typing a friend's name and when he selects the name the name is written in the text box(jQuery). And if the user wants to select more than one friend, when I'm inserting the names in the database, how can I separate the names that are written in one input field?
You should take a look at the jquery auto-complete plugin:
http://docs.jquery.com/Plugins/autocomplete
Also, you could separate the names using commas.
Are you looking to write your own plugin or would you like to use an existing one?
If you want something ready made, here are a few examples
if you want something extremely light, only 6kb packed, this one would be the best choice
Autosuggest jQuery Plugin
Older one but still good
Tokenizing Autocomplete
This what already asked here on this site.
Facebook style JQuery autocomplete plugin
The accepted answer cited this jQuery code.
https://github.com/loopj/jQuery-Tokenizing-Autocomplete-Plugin
http://jqueryui.com/demos/autocomplete/
Although think twice about including the whole jquery ui library for this one plugin
I've implemented this a couple of times, it is not that difficult to achieve decent results and the basic idea that I used was...
1) create an input box.
2) create a div positioned directly underneath the input box.
3) create a jquery keypress handler. if there are more than x characters typed, ajax request.
4) loop through the results, and if they exist, append result divs to the result box.
5) show the result box.
I can dig up some example code if you would like. Not sure what you are talking about with the select multiple, but you could keep a variable of selected, and change the color of the result div when it is clicked on, this way many results can be selected and then processed later.

Editable timetable using Drupal

I'd like to manage a timetable using Drupal 6, there are several pieces of equipment on which an administrator distributes people who get to use the equipment.
Essentially I want a table of equipment versus day of the week. The plan shows the occupation of all equipment for the whole week.
What makes it more complicated is that the editing of the timetable should be very easy and quick. Usually people have the equipment for multiple days, so one should be able e.g. to drag an entry and fill out more days this way. I'd also like to have a selection of people visible that one could drag onto the timetable and fill it out that way. I assume one can do that with javascript, but I have no experience with that.
Is it possible to create something
like that with the Drupal Forms API?
Any pointers/examples for the
dragging javascript?
Or is there some existing software or
Drupal module that can do that?
I've found a nice javascript example for drag and drop in a timetable, it should be possible to adapt that for my case. I'll just have to figure out how to best integrate it with Drupal.
Edit:
The script I've mentioned at the top of the answer did not work inside my Drupal installation so I switched to Jquery UI.
I've implemented it now as a custom Drupal module that uses JQuery UI for Drag&Drop functionality. I've enabled Drag&Drop for a HTML table, to save the timetable the elements of the table are read out via Javascript and then sent to my custom Drupal module using ajax.
A Fields drupal 7 module that creates a timetable field that can be display through an nice weekly grid. Can be use to display opening hours or working hours in a very neat way :
http://drupal.org/project/field_timetable
Couldn't Equipment be a Content Type, and have different properties as you describe? Then you can enter each piece of equipment as a node. This would save you a ton of time vs making it with the Form API.
CCK
TableField CCK
Why don't you use the Event module? Basically, it gives you an Event node type. Then a view can generate the calendar page of all nodes.
I am not exactly sure whether the MERCI module has every functionality you want. I ran some tests and it looks pretty good, works even better. It is though available only in the prerelease aplpha 5 version but it should do it's job.
To drag and drop. It should not be that difficult to improve the forms using some JQuery as #Fabian suggested.

AJAX, PHP, XML, and cascading drop-down lists

What PHP libraries would you recommend to implement the following:
Three dependent drop-down lists
Three XML data sources
AJAX-based
Essentially, I'd like to create an XML database and wire up a form that allows the user to select three different dependent parameters:
User clicks Region
User clicks District (filtered by Region)
User clicks Station (filtered by District)
Even though I would like to use PHP and XML, the general problem is:
One XHTML form
Three dependent, cascading drop-down lists
Three flat files (no relational database) for the list data
The solution must be efficient, simple, reliable, and cross-browser.
What technologies would you recommend to solve the problem?
Thank you!
I'd say jQuery and the Autocomplete plugin.
make three conventional text boxes and enhance them with autocomplete()
each one requests data from the server as the user types, via AJAX GET requests
the server sends back the matching data as line-based text, which in turn the autocomplete plugin uses to display a list of options
hook up an handler for the result event of the dropdowns, storing the selected option.
the second textbox would require the first to be set and so on
each textbox requests data from the server including all previously selected options so the server can find the right data
the server works with DOMDocument and DOMXPath to get the data, the autocomplete plugin has built-in client side caching do ease load on the server
Vanilla php and a good JavaScript framework is all you'd need.
You'll need to build a php script to generate filtered lists of districts and stations based on the provided parent filter (pushing out the data as either xml or json). The php will need to parse the xml data and filter the list based on criteria (obviously a db will handle this better than manually parsing xml)
Then use a js framework to query the php files every time the parent list's value changes. A js framework isn't required (and actually cause some bloat), however it'll make developing the app an easy task.
Personally I'd recommend jQuery due to the easy learning curve, but any popular js framework will yield the same result.

Categories