forms

How do I prevent the original form from losing focus when I show another form?

≡放荡痞女 提交于 2020-01-25 01:50:07
问题 I am having a problem where my main form loses focus when opening a new form. I know I can revert the focus back by using mainForm.focus() , but how do I handle things if I want the main form to never give up its focus when new window is opened? 回答1: You can accomplish this by overriding the property ShowWithoutActivation in order for it to return true in the forms that you want to show without stealing focus from the form that shown it, in your case that would be your main form. 回答2: Cody

How do you determine which submit was used to submit a form with jQuery?

心已入冬 提交于 2020-01-24 22:58:21
问题 Keep in mind that the user does NOT have to click the submit nput. They could tab over to it and push enter. So considering all ways a form can be submitted, how can you determine which one was used to submit the form inside the submit event. I have different names on the two submit elements. 回答1: Any action that triggers a submit button — be it an actual mouse click or some keyboard action — still triggers a "click" event and still causes the input to be included as a form parameter. That is

MechanicalSoup action difficulty with forms

天大地大妈咪最大 提交于 2020-01-24 21:56:46
问题 First, I am French so if there are mistakes in my english I'm sorry. So here is my problem, I have hard time with mechanicalsoup. So here is my HTML page: <form class="XFYOY" method="post"><h2 class="vvzhL ">Inscrivez-vous pour voir les photos et vidéos de vos amis.</h2> Here are just the first line. I want to create an automatic form but there is not action and I don't know what to put in browser.select_form(): browser.select_form('form[action=/post]') browser["emailOrPhone"] = "0689754327"

Upload / Naming folders to a destination folder on Google Drive using Google Apps Script

元气小坏坏 提交于 2020-01-24 20:56:11
问题 My skills in coding/scripting are limited, please bear with me on incorrect terminologies; I need people to input three values on the form, [Objectives, Goals, and Remarks] followed by uploading an attachment (s) to my Google Drive. The script that I found (attached below) is working but needs to be adjusted (edited) for my needs. Please, I need help with the following: Right now, the files when uploaded, proceed to the default Google Drive folder. But I need them to be directed to a folder

Django - Submitting form with multiple inputs for same field

大城市里の小女人 提交于 2020-01-24 20:06:36
问题 Forewarning: I'm very new to Django (and web development, in general). I'm using Django to host a web-based UI that will take user input from a short survey, feed it through some analyses that I've developed in Python, and then present the visual output of these analyses in the UI. My survey consists of 10 questions asking a user how much they agree with a a specific topic. Example of UI for survey: Example of UI input screen For models.py , I have 2 fields: Question & Choice class Question

Site wide Zend_Form

只谈情不闲聊 提交于 2020-01-24 19:44:10
问题 How can I add a form to my layout.phtml? I would like to be able to have a search form and a login form that persists through every form on my site. 回答1: I have a blog post explaining this: http://blog.zero7ict.com/2009/11/how-to-create-reusable-form-zend-framework-zend_form-validation-filters/ In your Application folder create a Forms folder This is an example form: <?php class Form_CreateEmail extends Zend_Form { public function __construct($options = null) { parent::__construct($options);

Can I have multiple levels of nested cloned forms using SheepIt JQuery plugin?

試著忘記壹切 提交于 2020-01-24 19:01:08
问题 I have tried, with no avail, to create a nestedForm inside of another nestedForm using the SheepIt! plugin. Is this even possible? Extending Demo 7 on the SheepIt! website, I tried to add an additional nested form in JSFiddle But I get a indexOf error... Remove the following section to get rid of the error but break the intended functionality: JSFiddle , nestedForms: [ { id: 'person_addresses_#index#_phones_#index_phones#_tests', options: { indexFormat: '#index_tests#' } } ] 回答1: Here is the

How do I fill in a website form and retrieve the result in C#?

こ雲淡風輕ζ 提交于 2020-01-24 13:56:06
问题 I would like my program to be able to access a website that processes string input and returns some information about it. I want to input two sequences, submit them and read the result through the program. The website is the following: http://scansite.mit.edu/motifscan_seq.phtml If you enter say 5031601 as Protein Name and DRNAYVWTLKGRTWKPTLVILRI as Sequence, you will be redirected to the results site. This is the site I want to be able to read with my program. I have researched a lot about

How to unit test Symfony 4 Form with EntityType field

梦想与她 提交于 2020-01-24 13:24:27
问题 How to unit test Symfony 4 Form with EntityType field When I run my test: $ ./vendor/bin/simple-phpunit tests/Unit/Form/ProductFormTest.php This is the output in my terminal: PHPUnit 6.5.8 by Sebastian Bergmann and contributors. Runtime: PHP 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 with Xdebug 2.7.0alpha2-dev Configuration: /var/www/project/phpunit.xml.dist Testing App\Tests\Unit\Form\ProductFormTest E 1 / 1 (100%) Time: 551 ms, Memory: 6.00MB There was 1 error: 1) App\Tests\Unit\Form

How to unit test Symfony 4 Form with EntityType field

本小妞迷上赌 提交于 2020-01-24 13:23:31
问题 How to unit test Symfony 4 Form with EntityType field When I run my test: $ ./vendor/bin/simple-phpunit tests/Unit/Form/ProductFormTest.php This is the output in my terminal: PHPUnit 6.5.8 by Sebastian Bergmann and contributors. Runtime: PHP 7.2.4-1+ubuntu16.04.1+deb.sury.org+1 with Xdebug 2.7.0alpha2-dev Configuration: /var/www/project/phpunit.xml.dist Testing App\Tests\Unit\Form\ProductFormTest E 1 / 1 (100%) Time: 551 ms, Memory: 6.00MB There was 1 error: 1) App\Tests\Unit\Form