Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I am actually making a change for a drupal 4.6 site where now the customer wants certain articles listed by their own arbitrary way of listing it. I thought I'll just enable the weight module and sort by sticky ASC but obviously that doesn't work.
yes i know this topic is posted many time...but i haven't found a solution get this problem solved!
does anyone have the some prob?
meanwhile (i dont know if this one is really a alternative) i use favourite nodes modul...
A lot of folks have had an idea for an Ajax module which would allow for content on your pages to be updated via Ajax, which would mean that page reloads, and hopefully database calls, could be minimized. I've got an unobtrusive Javascript which I've constructed which takes all of the links of the page, and sends the calls via Javascript to the server, where a server-side script returns the contents of the appropriate file. If Javascript is disabled, the links will operate as normal (or if the browser the user is using doesn't support Ajax properly).
Is there a way to tell the form that he has to put 2 fields next to each other instead off top down?
For example i want to create a form where the user can input a begin end end date. It's not functional that you provide a textbox with 100 characters for the begindate and the same for enddate. Therefore i want to tell the form the date field has only 12 characters and he has to put the begin and end date next to each other. Or is it something i have to theme?
I have a user form on which I want to perform input validation before processing the data. hook_validate() seems like it'd be perfect for this, but I'm not getting the expected results. Basically, I have a page that displays an options form on initial load. After the user submits the form, the real content is displayed based on the selected options.
What I want to do is validate the form input prior to serving the real content. If the input is not valid, re-display the form along with an error message; otherwise, proceed to the content. Please see the example code below - the if/else seems to be the significant part, as I'll describe after the code.
function ssh_page() {
$output = '';
// Display host selection form
if (empty($POST['host_select'])) {
$output .= drupal_get_form('ssh_page_host_form', $form);
// Display SSH applet
} else {
ob_start();
?> <SNIP - a lot of HTML> <?php
$output .= ob_get_contents();
ob_end_clean();
}
// Show output
return $output;
}
function ssh_page_host_form_validate($form_id, $form_values) {
echo "blah";
form_set_error('', t('test'));
}
I've created a module that uses nodeapi to add a select box to a node, so that when a user creates a node, they can select yes or no to save the node as a template or not. The selection gets written to a db table with two fields, which are nid and template. Now I need to be able to query the db and get a list of all of the nodes that have been saved as templates by a particular user. I've been reading up on INNER JOIN, but I'm kind of new to this, and I'm not sure how to construct the query. Does anyone have any guidance they could give on this?