forms

Creating custom form controls in Angular 2

前提是你 提交于 2020-01-13 05:37:26
问题 I'm trying to create a custom form control component for a <select> element (I realize this isn't the most innovative use of creating a custom form control, but this is just for testing purposes). I'm following along with the tutorial @ http://blog.thoughtram.io/angular/2016/07/27/custom-form-controls-in-angular-2.html. What I'm aiming for is to have the submit button disabled until a value has been selected from the <select-box> component, but I don't think I have the custom form control

Include part of form in jQueryUI dialog box

时光总嘲笑我的痴心妄想 提交于 2020-01-13 05:16:11
问题 I have code that looks like the following: <form id="MyForm" name="MyForm" method="post" action="index.php"> <input type="text" id="Input1" name="Input1"> <input type="text" id="Input2" name="Input2"> <div id="dialog"> <input type="text" id="Input3" name="Input3"> <input type="text" id="Input4" name="Input4"> </div> <button type="button" onclick="$('#dialog').dialog('open');">Fill out 3 and 4</button> <input type="submit" value="Submit"> </form> I can put the second part of the form in a

How to prevent user from bookmarking URLs?

浪子不回头ぞ 提交于 2020-01-13 03:49:51
问题 My website's webpages displays webpages by using GET to retrieve variables from a predefined URL. For example the code on the first page: index.php <p><a href="/blank.php?name1=value1&name2=value2">next page</a></p> The second page: blank.php?name1=value1&name2=value2 $name1 = $_GET['name1'] ; $name2 = $_GET['name2'] ; echo $name1 ; echo $name2 ; This way webpages are created on the spot and displayed kind of like a CMS and Iuse this method for all the webpages my site has, but if a user

Arabic presentation forms B support in c#

こ雲淡風輕ζ 提交于 2020-01-13 02:50:09
问题 I was trying to convert a file from utf-8 to Arabic-1265 encoding using the Encoding APIs in C#, but I faced a strange problem that some characters are not converted correctly such as "لا" in the following statement "ﻣﺣﻣد ﺻﻼ ح عادل" it appears as "ﻣﺣﻣد ﺻ? ح عادل". Some of my friends told me that this is because these characters are from the Arabic Presentation Forms B. I create the file using notepad++ and save it as utf-8. here is the code I use StreamReader sr = new StreamReader(@"C:\utf-8

Thymeleaf registration page - Error during execution of processor 'org.thymeleaf.spring4.processor.attr.SpringInputGeneralFieldAttrProcessor'

丶灬走出姿态 提交于 2020-01-13 02:14:27
问题 I'm making a registration page for a website. I understand that in order for a new User to be created, an id is required, so we have the field: <input type="hidden" th:field="{*id} /> However, when I go to the page, I get the error I mentioned in this post's title. Here is the form in question: <form th:action="@{/users/register}" th:object="${user}" class="form-signin" method="POST"> <h2 class="form-signin-heading">Register</h2> <input type="hidden" th:field="*{id}" /> <label for=

Jquery submit a form via .submit() on AJAX success… how?

扶醉桌前 提交于 2020-01-12 18:55:06
问题 I'm trying to send all form data to a script via AJAX by binding a click function to the submit button, setting it to return false so it doesn't submit the form yet. Once AJAX is done with success, I'd like to submit the form by doing: $("#myform").submit(); But nothing happens. Everything works except for $("#customOrderForm").submit(); This is for a Paypal payment. Form data gets stored in a session, users go make they payment, return to the website once they successfully made the payment,

How to Test Standard HTML Forms

断了今生、忘了曾经 提交于 2020-01-12 18:47:13
问题 What tools are best for lightweight testing of HTML forms? My particular use is very light: no multithreading issues nor elaborate test scripts: just fill in a form with particular values and let me click submit. A Firefox plugin would be fine... 回答1: Have you looked at Selenium IDE or does this not fit the light weightness? It is a Firefox plugin and although it does use scripts, it can record and playback with little effort. 回答2: Try Autofill Forms for Firefox. Customizable and promises to

How to Test Standard HTML Forms

我们两清 提交于 2020-01-12 18:46:09
问题 What tools are best for lightweight testing of HTML forms? My particular use is very light: no multithreading issues nor elaborate test scripts: just fill in a form with particular values and let me click submit. A Firefox plugin would be fine... 回答1: Have you looked at Selenium IDE or does this not fit the light weightness? It is a Firefox plugin and although it does use scripts, it can record and playback with little effort. 回答2: Try Autofill Forms for Firefox. Customizable and promises to

How to read Excel files from a stream (not a disk-backed file) in Python?

人走茶凉 提交于 2020-01-12 14:54:28
问题 XLRD is installed and tested: >>> import xlrd >>> workbook = xlrd.open_workbook('Sample.xls') When I read the file through html form like below, I'm able to access all the values. xls_file = request.params['xls_file'] print xls_file.filename, xls_file.type I'm using Pylons module, request comes from: from pylons import request, tmpl_context as c My questions: Is xls_file read through requst.params an object? How can I read xls_file and make it work with xlrd? Update: The xls_file is uploaded

Why a button is clicked when a form is submitted?

邮差的信 提交于 2020-01-12 14:33:49
问题 Say, I have a form with a text input and a submit button. If there are no buttons in the form, just submit event triggers, but if there is at least one button with no type attribute or with type="submit" , it clicks it too. Now, when I enter something in the input and then press Enter, I see that both button click and form submit events are triggered. Example: <form> <input type="text" /> <button onclick="alert('submitted');">Submit</button> </form> I suppose the form clicks the button