In a Drupal 6 module, the hook_form function is used to generate a create/edit form. How do I create different forms for create and edit instead of using the same form for both?
Hi.
Anybody knows how to merge two menus with the same name in a MDI application.
More exactly, in the MDI main form I have a menu called 'File' which has a sub-menu called 'Load project'.
In the MDI child form, I have a menu called also 'File' which contains a sub-menu called 'Save project'.
How can I force my application to show both 'Load' and 'Save' sub-menus under the 'File' menu?
-
PS: setting the same GoupIndex value will not work.
I've written a couple of c# forms applications which use a lot of the same data/objects which would better be combined. I realise I could use modal forms to launch each of these but where should I state .dll's and other resources, on the parent form? or on each other form where necessary?
I have an 'order' Model:
class Order(models.Model):
date_time=models.DateTimeField()
# other stuff
And I'm using Django ModelForm class to render a form, but I want to display date and time widgets separately. I've came up with this:
class Form(forms.ModelForm):
class Meta:
model = Order
exclude = ('date_time',)
date = forms.DateField()
time = forms.TimeField()
The problem is that I want to put these fields somewhere between 'other stuff'
If I am making a module, and want to have two custom paths:
path/path/path/index.htm (calls drupal_get_form)
and post to
path/path/path/result.htm
How do you do that? I get a 404 on the second path. I get the form and what I want with the first path easily enough. All I want to do is theme the form results as a drupal table and display it here.
<form enctype="multipart/form-data" method="post" action="mailto:[email protected]" accept-charset="UTF-8">
Is there a problem if mails are sent this way .. i wanna avoid using PHP codes..
I have a GridBoundColumn in my RadGrid that should accept Zip input and based on input auto populates the State and City fields on my form. I would like to wire this up in such a way as to call a webservice on the back end or maybe repost the form only when the GridBoundColumn is changed. How do I wire this up please?
Thanks in Advance
I have a select form. After a user selects option A, B, or C I need to use Ajax to load another form based on the users decision.
I'm not asking for someone to program this for me. I am just wondering, does anyone know of any good resources to help me accomplish this?
Thanks for your time.
I want to display text on a page like in the following way:
My Text: Text Here
My Text: More Text Here.........................................................
Text from line above continued here.
I have the following markup just to test:
<html>
<head>
<style type="text/css">
body {
font-family: arial;
}
form div {
padding: 3px;
}
form .label {
float: left;
text-align: right;
width: 150px;
margin-right: 8px;
}
</style>
</head>
<body>
<form>
<div class="label">My Text:</div>
<div>Aenean tellus diam, pharetra sed posuere sed, ullamcorper eget enim. Suspendisse quis posuere nisi. Integer sodales neque id erat luctus suscipit. Curabitur in nisi arcu. Curabitur suscipit tellus non lectus blandit non mollis risus aliquet. Proin et felis nulla. Integer ut felis nibh, eu condimentum elit. Sed tincidunt fermentum lorem, convallis ornare ipsum mattis sed. Vestibulum vel quam sed velit condimentum volutpat eu sed enim. Duis tincidunt, turpis id suscipit molestie, erat tortor tincidunt augue, eu venenatis erat neque nec nisi. Nunc malesuada bibendum elit eu bibendum.</div>
<div class="label">My Text 2:</div>
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla suscipit arcu ut risus dapibus tincidunt et ut orci. Vestibulum vitae urna in ligula fringilla facilisis aliquet vel nisl. Quisque placerat risus eget arcu fermentum at consectetur arcu lobortis. In hac habitasse platea dictumst. In in libero non justo pellentesque cursus quis non nisi. Donec sit amet pharetra ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla enim enim, fringilla vitae sodales id, ultrices non lacus. Etiam id augue ut dui convallis hendrerit. Vivamus urna justo, dignissim in suscipit eu, facilisis a libero. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. .</div>
</form>
</body>
When this is rendered about half the text is displayed underneath the corresponding "label" class div. I would like all the text to be appear to the right of the "label" div.
I want to get a list of all the forms in the project i am running a form from .
Suppose i am running a project which has 4 forms
1.Form1
2.Form2
3.Form3
4.Form4
and i want to retrieve the list of them for further direction which form to direct to
Hi Friends,
I am using Blackberry eclipse environment , for blackberry application i am using start up screen with process bar , i am filing progress bar using timer, after process bar 100% completed then need to navigate the screen to another screen, i am checking like this
timer.cancel();
if(i=99)
UiApplication.getUiApplication().pushScreen(new TipCalculatorScreen());
here i is time, increased form 0 to 100
but this code is not working how to navigate the screen form one page to another page after process bar is completed, please give me small example.
Hi I am trying to make a simple search form that uses a startTime and endTime to specify a time range. The db has a datetime field time that is compared against.
So far when i try to use params[:startTime] in the controller I get an array of values which wont work with :conditions = ['time < ?', params[:endTime]]
Is there a simple solution to parse the form's datetime to SQL datetime?
I have a website, and when I tell Firefox to remember my username and password for the website, it is causing the username and password to display in all forms on my website, such as registration form. It is only supposed to do this on the login form. Does anyone know a fix for this?
hello i would like to know how would it be possible to create a manual php header example
header("Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\");
instead of using that i would like to create manual it as
$senddata = "Content-Disposition: form-data; name=\"$fieldname\"; filename=\"$filename\"".$nn;
Hi,
I have been trying to figure out how to use the jQuery BBQ plug-in.
I have been able to add it to my site by copying the code from the site but I'm seeing that if I have a form in one of my tabs, I can't post any of the results successfully.
Has anyone used this plug-in and gotten used to its functionality? I need help figuring out where to input my php code for form handling and have the results returned the page loaded in the tab.
I'm developing a windows form application in C# and (SOMETIME) every button in the form need to be clicked twice to fire an event.
Can anybody suggest a solution?
Best Regards,
BaDoOoReY
I need to obtain the String for the file that is being uploaded from forms to store in the database.
I am using the usual form input file element
input type="file" name="some_name"
I found a couple JS scripts that allow me to do useless things like display the string in a dialog box, etc.
I need this as an element on the request object or as a hidden field on my page when the form is posted.
This is a 101 question I know, sorry.
I have two controllers; Users and Static
Static/index is my root index page
I want the Users/new form to be displayed on my index page.
All forms are working, just no idea how to include the User form on Static/index
I'm working with Ruby on rails 2.3.4 and I'd like to pass some parameters from one page to another ones the first one is submitted.
For example:
On the first page, I have a form that when it's filled a Preview button can be clicked to check all the info entered before submitting the form. That button redirects to another page with the info entered before, but I don't know how to get it in the second page.
I'm trying to build a login system with ajax and php. I use a log-view where I then save the data in ajax which brings into my doLogin.php (php file). My problem is that php file should never be any ajax data for when I build it into a class and a function
VIEW:
public function DoLoginBox() {
//inloggning form-tagg...
return '<p> </p>
<div id="content">
<h1>Login Form</h1>
<form id="form1" name="form1" action="Handler/doLogin.php" method="post">
<p>
<label for="username">Username: </label>
<input type="text" name="username" id="username" />
</p>
<p>
<label for="password">Password: </label>
<input type="password" name="password" id="password" />
</p>
<p>
<input type="submit" id="login" name="login" />
</p>
</form>
<div id="message"></div>
</div>';
}
AJAX:
<script type="text/javascript">
$(document).ready(function() {
$("#login").click(function() {
var action = $("#form1").attr('action');
var form_data = {
username: $("#username").val(),
password: $("#password").val(),
is_ajax: 1
};
$.ajax({
type: "POST",
url: action,
data: form_data,
success: function(response)
{
if(response == 'success')
$("#form1").slideUp('slow', function() {
$("#message").html("<p class='success'>You have logged in successfully!</p>");
});
else
$("#message").html("<p class='error'>Invalid username and/or password.</p>");
}
});
return false;
});
});
</script
PHP:
<?php
require_once ("UserHandler.php");
class DoLogingHandler{
public function Login (){
$is_ajax = !empty($_REQUEST['is_ajax']);
if(isset($is_ajax) && $is_ajax)
{
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$UserHandler = new UserHandler();
$UserHandler -> controllDB($username,$password);
if($username == 'demo' && $password == 'demo')
{
echo "success";
}
}
}
}
` $DoLogingHandler = new DoLogingHandler();
$DoLogingHandler-Login();
?
Hi I have a field in mySql table called jobnumber which auto increments with each new entry. What I want to do is when a user views my form, get the value of the next 'jobnumber' . But I want to do this before any entry is made to the table. IE so when a user looks at a form it will display something like 'this is job number 6954'
I have tried $rr = mysql_insert_id() but this only work after I have made an entry
Can anyone help please
thanks
hi,
what's the hook for the Save Button in Drupal ?
I've tried
$form['submit']['#weight'] = -50;
But it doesn't work.
I'm sure the template.php file works because for example:
$form['author']['#weight'] = -50;
works.
Thanks
Hey stackoverflow :)
I wanna use webbrowser control in c++(im using dev cpp).
Ages ago when i was using VB6 i just added webbrowser control (C:\Windows\System32\shdocvw.dll) to my form and it worked but im lost in C++...
should i load it dynamically with LoadLibrary and then somehow put it on my dialog window or how? I also wanna use all features like navigate to page, edit html elements, submit a form, read page source, ...
Someome got some snippet?
Cheers
I have a ASPX Page that contains several user controls, which are loaded dynamically after user interaction.
On one of ascx I have a hidden button that is being clicked on some user actions (via button.click()), which works fine on 1st page load.
But after the form is being submitted once, the other ascx is loaded. There if user clicks the back button and resubmits the 1st form (again via button.click()), button_clicked event on server does not fire again. Any thought?