forms

Dynamic multiple location form submit with javascript

Hey guys, I'm trying to write some JavaScript for my website that will select all the forms on a page, add an event listener for when they are submitted, and then route the values submitted to the main action page and an additional alternate page. Here's what I have so far: Send.php: <script type="text/javascript"> function po...

Rails -- Passing radio button values to a parameter

I'm trying to use some radio buttons to be selected and use the parameter as a find condition for my model... SO far I have. View <% form_tag do %> <p> <%= radio_button_tag :interest, "apple" %> Apple </p> <p> <%= radio_button_tag :interest, "orange" %> Orange </p> <p> <%= radio_button_tag :interest, "peach" %> Peach </p> <p> <%= radi...

Issues with Doctrine Versionable (Audit Log) Behavior

Hi, Im using the Doctrine versionable behavior for one of my models. The schema works fine & tables are created. But when I try to load fixtures for this, I get a fatal error saying class TaxCodeVersion not found. I checked my Model dir, and indeed the class TaxCodeVersion is not generated by Doctrine. I always use the build --all --no-c...

Delphi memo box won't capture Return key

Hi everyone hope you're all well. I have a question about memo box behaviour in Delphi, I have an application with two forms, both are dialogs and they both have memo boxes in them and they both have an OK button on them, however one dialog behaves differently from the other - if I am in the memo area and i type something and then press ...

PHP Sessions - User not stored after login.

I am building a basic password protected area on my website and I have a login form. <!-- login.php --> <?php session_start(); ?> <?php if(!empty($_SESSION['user'])) { ?> <form> <input type="text" name="username" /> <input type = "password" name = "password" /> <input type="submit" value = "login" /> <input type="hidden"...

Why usually <form> used to aggregate elements and not <div> in case when form working with ajax submit event?

Hi, Why usually <form> used to aggregate elements and not <div> in case when form working with ajax submit event? Ajax jquery function: $('#parse-form').submit(function() { $.ajax({ url: 'controller.php', type: 'POST', dataType:'json', success: function(data) { a...

Combining conditions in find. (Rails)

Now i am inputting some data from a form and i have a code to search the database inputting several parameters as input conditions. Now if one the parameters is null (i.e) the field is unchecked i need to replace that parameter with something say * so that the search query is unaffected. How would i do that? @report = Problem.find(:all,...

Drupal 6: custom admin login page

Hi friends, I need to create a custom admin login page. What is the candidate tpl file? Appreciate helps! ...

How to dock a windows form in C#?

Hello everyone, I just would like to know if it is possible to dock a windows form on top of the user screen? I have been trying to do this by manually setting the position of my form to the coordinates I want. But using this method, however, allows the user to change the position of the form just by dragging it. I want to make the for...

Interact with Flash using Python Mechanize

I am trying to create an automated program in Python that deals with Flash. Right now I am using Python Mechanize, which is great for filling forms, but when it comes to flash I don't know what to do. Does anyone know how I can interact with flash forms (set and get variables, click buttons, etc.) via Python mechanize or some other pytho...

Javascript component for window/pane flip effect?

I'm prototyping a thin client UI using extjs and am looking for an effect that will simulate a form/pane flipping over to reveal another form/pane. Its for a details view for an object that has two major sets of properties. I found a flex component that can do this, and can even simulate four different forms on the faces of a cube. ...

jQuery already submitted vs. being submitted

Hey guys, I'm working on a jQuery function that forwards form data to page without interfering with the normal submission. I can do it without any issues as long as I capture the submit using .submit(), but I would have to run my own validation on the data because it operates independently of the regular submission. Is there a way for j...

Dynamic Click via JavaScript (or jQuery) on a Checkbox

I know I can change the attribute checked to checked, but i need to actually "click" the checkbox to fire off a live() (jQuery) click event. I know I can also make it a function, but this would just be a lot cleaner and less code, if possible. Oh, and FYI: $('.modal-form [name='+json[0].owners[x].name+']').click(); Doesn't work. It c...

Sanitizing video embedding code in Rails. What's a good solution?

What's your preferred method of sanitizing embed code entered in a form? In other words, is there an easy way of ONLY allowing users to embed video from YouTube and Vimeo for example? Do you use the Sanitize helper? If there is a proven solution to this I'd prefer to use it rather than reinventing the wheel. Thank you for reading my ques...

What is the best way to insert many checkbox inputs into database?

Greetings, I have a form which it has almost 150 checkbox, but they are not in one place, the form is divided into divisions and each division has blocks, the checkboxes are put in these blocks depending on their group where you can find four checkbox in this place and eight in other and 30 in some other and so go on. So I made a two t...

How can I use PHP to mail my an attachment?

Hi all, I have a basic form consisting of input fields as well as a file field. I have a few things that I want the form to do. Collect the information (obviously). There's also an option to upload a file, (probably .doc,.pdf,.docx), so I want to restrict the attached file only to those extensions and under 2MB. All I know is that I hav...

Sending a simple attached file via PHP mail() function

Hi all, I'm going to give this another try because my last question might have been confusing. I have a simple web form consisting of the following some inputs (for now, pretend i have two inputs, name and file input). I want the user to upload a document (if possible restrict to .doc, .docx, .pdf, if this is not possible to accomplish,...

Should I use in this case post or get method for ajax form submission?

Hi, Should I use in this case method="post" or method="get" for ajax form submission? Update: When should be used post and when get in case of ajax form submission? <form action="script.php" method="post"> <label>Url: </label> <input value="http://" id="url-input" type="text" size="100" /><br /> <label>paste html file source: ...

What is the _snowman param in Rails 3 forms for?

In Rails 3 (currently using Beta 4) I see that when using the form_tag or form_for helpers there is a hidden field named _snowman with the value of ☃ (unicode \x9731) showing up. So, what is this for? ...

How to render HTML form from schema using formencode?

I'm using formencode for validating and submitting forms in my Pylons application. The documentation says that it can be used also for generating forms, but there is no any example. I even found the old topic which says it can be done with form = HTMLForm(form_template, FormSchema) form.render() but for the latest version of formenco...