form

Validate Form with PHP AND Javascriipt?

Is it possible to validate a form with PHP AND Javascript? I am currently able to do both using my existing form but only on an individual basis. My overall goal is this: Validate form using javascript client side and present any errors to the user immediately If javascript validation passes, a flag is created and then the PHP script...

Auto submitting to cfm

I've created a form that posts to a cfm file. When running a script onLoad that fills in the form values and tries to submit...The site takes me back to the login screen. <script> function f() { document.getElementById("email").value = "[email protected]"; document.getElementById("password").value = "asdf"; document.getElementById("form1")....

Making :focus work in ie7 using css?

Is there a simple hack for this? I'd prefer to avoid javascript. ...

Save a <canvas> as a file in a form

Using Canvas method toDataURL, I would like to be able to save the image on the server side (using Rails). With toDataURL string, how to use it in a form that can be seen as a file attachment in a HTML form ? ...

Respect regular onsubmit handlers from jQuery.submit

I want a jQuery form submit handler to respect any previous submit handlers, including ones added with onsubmit. I'm trying to detect the previous handler's return value but can't seem to do it: <form><input type="submit" /></form> <script type="text/javascript"> $('form')[0].onsubmit = function() { return false; }; // called first $('...

Additional information with widgets in django

I am displaying a django widget, with which I need to display additional information (something like a tool tip) that is attendant to the widget. I essentially have a widget that asks a random question, which is self contained. {{ form.fieldname }} displays the full widget which looks something like (à la the widget's render method):...

Lookups with multiple values are not showing porperly in sharepoint edit and display custom form

HELP! For some reason when I create a custom edit or display form, all the lookup fields are showing in a weird way or not showing any value at all, can someone explain to me how I am suppose to fix that, I know it has something to do where it say select="@value" in the display form. Please help me out. Thank you. ...

UI form component for ASP NET MVC

Hi I'd like to find a component that help me to build input forms in asp MVC. I find that ther are many components (grid, tree, tab...) but not a "Form component". I know that i can use the HTML HELPER (.labelfor(.. .inputTextFor(... ) ..but i don't like to write the html tags around the fields and labels ( ... ) I want that all the form...

How do I identify where the POST data sent to a PHP script came from?

I have a ton of data collection forms on my website, and I wrote a PHP script to handle all the data. All the forms have that one script as their action, and POST as the method. The handler emails a copy of the data to me, and I'd like for the emails I get to contain the URL of the form where they originated. Is there any way in PHP t...

Update textInput from object in C# form

Hi, I have a form in c# with a multiline textInput which content I need to be updated form an object outside the form. How can I achieve this ? Using events ? Passing the textInput to the object's contructor ? Thanks in advance. ...

inheritance confusion. Adding a special class for making errors obvious on form validation

So I've got a form... The relevant CSS is (I think): .libform input { background-color:transparent; color:#000; border-left:0; border-right:0; border-top:0; border-bottom: 1px solid #555; margin: 0 5px 1px 5px; display:inline-block; } .libform input:focus { border:0; border-bottom: 1px dotted #000; color:#939; background-color:#fed; } ....

HTML submit form using a CAPCHA image or a security question which one is more secure?

I've seen developers use various methods to prevent spam on a basic html contact form Method 1 is where the developer uses a Captcha image and Method 2 where only a Question is asked eg. Are you Human? with a radio button. Which one is the better one to use and why? ...

Parameters lost on login form submitted with post in JBoss

My login page contains two forms: one for logging in and one for signing up. Shorten like this: <form name="LoginForm" id="LoginForm" method="post" action="j_security_check" > <input type="text" name="j_username" /> <input type="text" name="j_password" /> <input type="submit" value="Sing In" /> <form> ...

Drupal Ctools Form Wizard in a Block

Hi everyone I created a custom module that has a Ctools multi step form. It's basically a copy of http://www.nicklewis.org/using-chaos-tools-form-wizard-build-multistep-forms-drupal-6. The form works. I can see it if I got to the url i made for it. For the life of me I can't get the multistep form to show up in a block. Any clues? /...

Does form with enctype="multipart/form-data" cause problems accessing a hidden field

I have created a hidden form element <form name="UploadImage" enctype="multipart/form-data" method="post" action="UploadImage"> <label> </label> <input name="imgUploadObjId" id="imgUploadObjId" value="52" type="hidden"> //rest of the form here </form> And I am trying to get the value with this line in a servlet (...

HTML form to JSON without modern libraries

Does anyone know of a simple javascript library that serializes a form DOM object to JSON? I know jQuery has the serialize method but since I am writing an app for IE mobile, I can't use any of the new fancy libraries, must be oldschool simple javascript, as light as possible. Cheers ...

Send jQuery array to PHP post?

I have a javascript function that gathers two arrays, imagepaths and captions. I want to send with PHP's post to the same page $_SERVER['PHP_SELF'], but I really don't know where to start.. PHP: if (isset($_POST['Submit'])) { $edit_photos->update_xml($edit_photos->album_id, $_POST['src_arr'], $_POST['caption_arr']); // prevent ...

Drupal form with custom ID

Correct me if I'm wrong, after reading drupal fapi related articles, I got the impression that fapi generates 'id' attributes by itself. It allows developers to assign 'name' attribute only. If that's the case, is there a way I can set desire 'id' value for elements? Because, I want my elements to have meaningful 'id' so that html/jquery...

jQuery.load and form elements

Is jQuery's .load() supposed to be able to load <form> elements? Because it seems to be stripping them out. So I have some code like: $('<div></div>').load($link.attr('href') + ' #divDlgContent', function(){ ... }); and when the $dialogcontents loads, I return some content with a <form> inside the DIV with the id 'divDlgContent'. A...

session_start is clearing form fields

I have 2 pages: one with a form and one that prints PayPal button. 1st page has script that prints the form, validates it and when everything is OK redirects the user to the second page that prints out PayPal button. On both pages I use session_start() to prevent CSRF. (when the accidently get to the second page, they are redirected to t...