Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am new to Drupal, and the requirement on hand is to create a UI that allows user to enter values on a Grid / Table like interface and the columns can be combo boxes/ text boxes.
Thought AjaxTable would be the apt thing, downloaded it, enabloed the modules along with j-query update.
But when it comes to using it, the readme points to ajaxtables/ docs document which is a PHP code, since am not a PHP programmer, how do i proceed from here. (I tried pasting the PHP code on a new page and setting the format as PHP, but the preview shows nothing.)
Thanks in advance.
Comments
Comment #1
chrisshattuck CreditAttribution: chrisshattuck commentedHi GV,
I just uploaded an update that adds the docs menu item to Administer > Help > Ajaxtable Documentation (/admin/help/ajaxtable_docs). However, in the version you have, you would visit either http://mysite.com?q=ajaxtable/docs or http://mysite.com/ajaxtable/docs depending on if you have clean URLs enabled.
Comment #2
k9barry CreditAttribution: k9barry commentedI am really close to getting this to work I think. I am new to this and am trying to learn the correct way to use ajax table and Drupal. Can you provide a example module (other than the admin/docs module) that only shows the call for one table so I can figure out what I am doing wrong.
Thanks You
Comment #3
pyc CreditAttribution: pyc commentedI enabled AjaxTable docs, but when I call http://site.url/?q=ajaxtable/docs, I just get Page Not Found... What's the problem?
Comment #4
marvinq CreditAttribution: marvinq commentedI am really trying to just make the demo work. I selected new content, then new page, and I've been trying to get the table to appear. This is what I typed:
function ajaxtable_table_ajaxtable_example1($override='') { ajaxtable_override($table,$override); return $table; } print ajaxtable_render("ajaxtable_example1");I added the JScript to the Misc directory. I turn off the AJAX documentation and even turned it on again, still nothing. Any ideas regarding what am I doing wrong? Will someone please provide code to help me get this thing working?
thanks in advance!
Comment #5
pyc CreditAttribution: pyc commentedSo it's not ?q=ajaxtable/docs, but ?q=admin/help/ajaxtable_docs ....
Comment #6
dmidkiff CreditAttribution: dmidkiff commentedNew to Drupal - I am having the same problem. Are we supposed to past the code into the body of a page? The documentation is unclear about this issue.
Comment #7
j j CreditAttribution: j j commentedAlso new to Drupal - I have read through 'admin/help/ajaxtable_docs' section and am confused as to what i should do at this stage:
To create a table declaration function, you need to create a function name that starts with "ajaxtable_table_" and ends with a unique ID:
function ajaxtable_table_ajaxtable_example1($override='') {
ajaxtable_override($table,$override);
return $table;
}
should this function be inserted into the body of a page or in another file within the ajaxtable module folder on my server?
Comment #8
pyc CreditAttribution: pyc commentedThat function should be inserted in the body of a page.
Here's my problem:
- I made a new content type with CCK kit (Phonebook entry)
- I want to change the nodes of that type through Ajaxtable, but as far as I can see, the node content is stored in separate table content_type_phonebook_entry, so I guess it is needed to edit both tables when updating or deleting phonebook entries. So my question is this: is it possible to redefine edit and delete actions in AjaxTable?
Or am I in total confusion? :)
Comment #9
DJL CreditAttribution: DJL commenteddmidkiff -
I agree
It is unclear!
You need to create a module of your own, into which you put the code.
You are going to have to get into PHP!!!
Tedious.
It would be great to have a section in the Views module to make a view provide an AJAX table.
Comment #10
DJL CreditAttribution: DJL commentedPYC
I am in the same boat.
I too am a relative Newbie - never touched the PHP until this moment.
What we have to do is discover the SQL that will deliver the info we need
We can then supply that to the AJAX TABLE routines.
my CCK fields are start_date, Field_leader, Field_service
I need HELP to figure out how to deliver this
I imagine it will be something like
SELECT node.Title, event.start_date, CCK.Field_leader, CCKField_service from node, event,ck where (node.nid = cck.nid) and (node.nid=event.nid) AND node.type= 'MyContentType'
But what are the table names, and the column names?
Comment #11
DJL CreditAttribution: DJL commented>
It would be great to have a section in the Views module to make a view provide an AJAX table.
<
And it seems someone has almost done that - editablefields
So I will drop ajaxtables for the time being - although it offers more ajax functionality.
Comment #12
FreeFox CreditAttribution: FreeFox commentedHi, I know how to use PHP but can't get it to work. Could someone post something simple so I have a working startpoint? Something like this maybe:
1. Open a new page
2. Copy ... into the body
3. Select PHP as input format
4. Save page
and now you will see a table populated with ...
Thanks in advance
Jan
Comment #13
rainstyle CreditAttribution: rainstyle commentedAs far as I know this is a module designed to be used by other modules rather then directly as content. If you are not familiar with module development in drupal check out the module developers guide.
I am developing a module that uses ajaxtable called Results Table. Unfortunately I had to modify ajaxtable to work for me, I'm now looking into a ways of working around these issue before I officially publish the module. However, feel free to use this as a guide for what hooks and functions you might need to develop a module that uses ajaxtable. It is a node type, includes a block element and I use the basic theme but modified it to make it a little simple for my purpose. There are link to a working version of the module from my site.
Comment #14
sukh.singh CreditAttribution: sukh.singh commentedIs there anyway to edit/save node with the help of jquery.I am using Ajaxtable will it be possible to edit/save nodes direclty with help of jquery if yes can you tell me how to do it?