forms

Calling symfony helper from a php script needed for Ajax?

N00b question: I'm using Symfony with Doctrine. I have a form where I've added a little Jquery & Ajax check of whether a username that has been inputted into the form already exists. The jQuery calls a short PHP script on my web root that does the MySQL database check and returns true/false, which is then used to determine what error me...

Most efficient, safe way of dealing with a large number of $_REQUEST variables in php

I have a form that submits a large number of inputs... <input type="hidden" name="searchTag_happy" value="0" /> <input type="hidden" name="searchTag_sad" value="0" /> <input type="hidden" name="searchTag_ambivalent" value="0" /> etc . . . The value attributes for these inputs can be either "0" or "1". I would like to use this informa...

Rails complex form editing multiple records at once with associations

I am developing a complex form that updates several records of one model at once, whilst simultaneously updating an associated model. It looks a bit like this: class Sport has_one :photo end class Photo belongs_to :sport acts_as_fleximage end class Page # the page is not related to either of the previous models end Just for ...

How can I add an onmouseover event to all drupal forms?

I want to add an onmouseover event to the submit button of all forms on my drupal site. How can I do this? Ben ...

VB.NET - Form Placement

Hello everybody, I am making a program in vb.net (visual basic) that has two forms. I have one as a sort of "main" base which will be behind everything. Then I have another additional form which is suppose to go on top of the "main" form. Well I get this to work when I show both of the forms, but I want the smaller (additional) form to ...

Adding rows dynamically with jQuery

I'm building a form where I need multiple optional inputs, what I have is basically this: Every time a user presses the plus button a new row of form inputs should be added to the form, how can I do this in jQuery? Also, is it possible to automatically add a new row when all rows (or just the last row, if it's easier / faster) are fil...

Disabling multiple submit on HTML forms

If my user clicks more than once on a submit button of a form, he essentially sends multiple GET/POST requests (depending on the form prefs). I find that disabling the submit button using JS is a bit problematic, because if a user tries to stop (ESC/Stop Button), it doesn't reset the button (unless you catch that and handle that using J...

How to ignore a file input on a PHP form?

I have a PHP form with an optional file input. If no file is chosen, and I do print_r($_FILES) after submission, I get this: Array ( [the_file] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) ) On forms with no file input, the $_FILES array is just empty, which is what I would prefer to happen if the optiona...

Saving new lines in a textfield to mysql field

Quick and simple (I hope) question; If a user inputs new lines in a text field, ie: 43 Dennis Beeston How can I save the new line rather than have it transferred to the mysql server as one line?! I am using PHP and mysql. Many thanks ...

Rails checkout form with multiple models

I'm creating a shopping cart based on the one in Agile Web Development With Rails (version 3). I have it set up where "items" are added to a "cart", then upon starting the checkout process, they are added to an "order" object as "line_items". "line_items" represent one "item" in any quantity. Up to this point, I'm not deviating from the ...

How to keep forms and frames compilable in Delphi 6 - 2007?

We recently converted our long-running Delphi project to Open Source. Multiple people have contributed patches already, which is great, but unfortunately forms and frames when saved with Delphi 2006 (and later) contain new properties in the .dfm that are not handled by older versions. Forms are handled quite gracefully by the IDE ("ignor...

can event handlers take current object as a parameter?

I have read where an event is triggered on another thread from the one that created the controls on a Windows Form. Therefore, the event handler can't directly update the controls (like changing a button's color). I read the explainations about Invoke or BeginInvoke being needed. My question: Why can't an event handler just be passed ...

Conditionally Require Only One Field In Django Model Form

Anyway to make a field conditionally required based on whether or not another field in the same form has been filled out? If field1 has no data, but field2 does form is valid. If field1 has no data and field2 has no data form is invalid Not looking for any javascript solutions. I feel as it should be solved with django for...

PHP $_FILE array missing entries from submitted HTML form

Hi, Basically when I have more than about 25 file uploads in one form, the PHP $_FILES array is cropped to the first 25 entries (0-24), which is incorrect. It should have all 31. This only happens on one particular server. Apache with PHP. I’ve tried it on two other servers and they seem to allow all 31. Could this be caused by some co...

get all form details in vb.net

hello sir, i want list all forms in current project. example listbox1.items.add(form1.name & form1.text) i want load all form details in current project. the following code give for only open forms. For linti As Integer = Application.OpenForms.Count - 1 To 0 Step -1 Application.OpenForms.Item(linti).Text Application.O...

Contact form problem - I do receive messages, but no contents (blank page).

I have a contact form on site which used to work, but since last few months has stopped working properly. This could have been due to some coding error that I can't figure out. What happens is that I receive the messages sent, but they are completely blank, with no contents at all. What could be the problems? I'm attaching first the...

Keyboard Focus Breaking with Radio Button Group

It seems simple, but this has been a bit of a headscratcher for me. Given the following (valid xhtml transitional) code: <form action="weird.html"> <label for="test1">T1</label> <input type="radio" id="test1" name="test" value="1" /> <label for="test2">T2</label> <input type="radio" id="test...

Add and remove form fields in Cakephp

Hi Guys, Im looking for a way to have a form in cakephp that the user can add and remove form fields before submitting, After having a look around and asking on the cake IRC the answer seems to be to use Jquery but after hours of looking around i cannot work out how to do it. The one example i have of this in cake i found at - http://...

Reference calling DOM element in jQuery.ajax() with dataType 'script'

Let's say I have the following scenario: <form action="/something.php" method="GET">Click me</div> <script type="text/javascript"><!-- $('form').submit(function(e) { $.ajax({ url: this.action, method: this.method, dataType: 'script' }); return false; }); //--></script>...

Blog post comment without page refresh (ajax)

Hello everybody, I'm trying to make comments on my page just like the ones in wordpress. When you press post comments your page updates without reload. How can I do that? I understand I have to use jquery post, and I've had several attempts but for some reason my web page keeps reloading. I have a form like this : <form name="postForm...