forms

From HTML form to PDF

我是研究僧i 提交于 2020-01-22 19:00:04
问题 Is there an easy way to have an HTML form on a webpage that, when the user submits, puts the data into a PDF file and sends it to the receiver? The webpage is running on .net. Thanks 回答1: Umbraco has a good PDF generator package called "XSL to PDF". It wil allow you to generate a PDF file from Umbraco just by defining a PDF template. Using this you should be able to achieve what you are looking for. 回答2: If you have C# use one of this libraries : http://csharp-source.net/open-source/pdf

Pluck id (integer) cast to string Laravel

送分小仙女□ 提交于 2020-01-22 18:51:29
问题 While plucking from a database, I get id as strings. $alphabets = new Alphabet(); return $alphabets->pluck('name', 'id'); Output { "1": "Apple", "2": "Ball", "3": "Cat" } Expected { 1: "Apple", 2: "Ball", 3: "Cat" } But, when I reverse ID and name , return $alphabets->pluck('id', 'name'); I get id as integer. { "Apple": 1, "Ball": 2, "Cat": 3 } I'm not sure what's happening behind the scene. But how can I get ID in integer ? Actually, old flash session doesn't set value because of 1 vs "1" in

Devise. Registration and Login at the same page

不羁岁月 提交于 2020-01-22 17:59:23
问题 I'm trying to integrate Devise into my application. I need implement login form at top of the page (I've implemented this form into layout page) and I've implemented registration which contains registration form. But it shows validation errors for both form when I tried submit incorrect registration data. 回答1: Without more information, it's hard to guess what the problem is. I've found the Wiki pages to be really helpful (and increasingly so), though you may have already looked them over:

C# 2005: Remove icon from the form's title bar

谁说胖子不能爱 提交于 2020-01-22 17:05:10
问题 A client has asked me to remove the icon from the form's title bar. As they don't want to display any icon. But this me guessing as when I click on the icon property you have to browse to some icon. 回答1: Set ShowIcon Property of the form to False to see if that's what your client wants. 回答2: There are two ways. First is to create an empty Icon file and then Select Form -> Right Click -> Goto Properties -> Goto Icon -> Select your file. The other approach is to set FormBorderStyle of the form

jsfiddle error {“error”: “Please use POST request”} when submitting a form

瘦欲@ 提交于 2020-01-22 17:03:30
问题 I'm new to using JSfiddle and get this error: {"error": "Please use POST request"} everytime I submit the form. What I have understood, you cannot submit a post request in JSfiddle, so how I can append something to a form? <form> <label>Add</label> <input type="text"/> </form> $('form').on("submit", function(){ $('form').after("apple") }); 回答1: If you do not explicitly set a form method browsers will default to using GET. <form method="POST"> 来源: https://stackoverflow.com/questions/24420736

How to javascript submit in the presence of an input id equal to 'submit'

a 夏天 提交于 2020-01-22 15:16:11
问题 I've been binding submit events to forms, and ensuring that they do not break the form, using jQuery like this: jQuery('form').submit(function(e){ var form = this; e.preventDefault(); alert('1'); setTimeout(function() { alert('2'); form.submit(); }, 1000); }); This is all good and well, except, if for some reason a front end developer gave a child input of this form an id of ="submit", this breaks, as form.submit() throws a JavaScript error (In Chrome, 'Uncaught TypeError: Property 'submit'

How do I use React and forms to get an array of checked checkbox values?

前提是你 提交于 2020-01-22 14:44:26
问题 I am trying to build a filter for my portfolio website. Checkboxes that let you pick a technology (react, redux, jquery etc.) to display a piece of work(s) that contain(s) that/those technologies. So every time the user clicks on a box, I want to add the value (JavaScript, Redux, React etc.) to an array that I use in another function to check against my portfolio pieces and filter out what isn't there. I am finding this very difficult and I think it should be quite simple. Can someone point

HTML form values adding commas in Classic ASP

一世执手 提交于 2020-01-22 14:32:44
问题 I have a classic ASP page that submits back to itself. Strangely, the values being returned from the selects have commas being added to the ends of them. Has anyone run into anything like this before? Any troubleshooting steps or tools recommended? I'm expecting the values to be returned just as numbers - they are the IDs of the values displayed in the option. I've checked for mystery commas in the page and can't locate any - nor in the data that I'm pulling through. (note - these are single

Angular FormArray display validation errors

爷,独闯天下 提交于 2020-01-22 14:19:31
问题 I have Angular form that is built with help of FormBuilder. Form contains a FormArray which has as many fields as user wants. I've set validator for fields this.fb.array([this.fb.control('', Validators.required)]) and for each new push validator is the same. The problem is that I don't know how to access a specific field's isValid property since they are bound with FormControl via [formControlName]="index" . I've tried to do it that way, but it doesn't seem to work <div *ngIf="array.at(index)

AttributeError: 'EditForm' object has no attribute 'validate_on_submit'

僤鯓⒐⒋嵵緔 提交于 2020-01-22 14:16:45
问题 I have a small edit app with the files bellow. When I submit tbe form it shows me AttributeError: 'EditForm' object has no attribute 'validate_on_submit' Can anyone please tell me what is the issue? forms.py from flask.ext.wtf import Form from wtforms import Form, TextField, BooleanField, PasswordField, TextAreaField, validators from wtforms.validators import Required class EditForm(Form): """edit user Profile EditForm""" username = TextField('username', [validators.Length(min=3, max=50),