How to fetch input image url to another input using of angularjs? - html

Hi all i am using MEAN stack in my Web portal with AngularJS as my front-end,
In my portal i want to upload user profile image, so i have used uplodcareplatform to upload the images in my portal.
My Plunker
after chooses the Image we get that image url in upload input, then we need to fetch that url into below input to store in backend. so we tried to get the solution like ng-bind="userimg=img" value="{{img}}" which is not working. please check and update us thanks.
My Code :-
<div>
<label >Upload Img</label>
<input ng-model="img" role="uploadcare-uploader" name="content" data-public-key="240426036fd9daf2d723" data-images-only />
</div>
<div>
<label for="quantity">Fetch above input value in this input</label>
<input type="text" ng-model="userimg" ng-bind="userimg=img" value="{{img}}">
</div>

Related

Save HTML form and values offline for later processing

I have an offline HTML form (see example below) which will have several tick options. The user gets the form sent by email, which he has then to fill offline and send the filled form back for later processing. How could this be implemented? I mean saving the html file when filled does not store the value. Any suggestions, ideas?
<form>
<div>
<input type="checkbox" id="check1" name="check1" value="ns">
<label for="check1">Is A correct?</label>
</div>
<div>
<input type="checkbox" id="check2" name="check2" value="ns">
<label for="check2">Is B correct?</label>
</div>
<div>
<button type="submit">Subscribe</button>
</div>
</form>
Best
Muleque
You can use local storage to store the data from the HTML form.
Here is the full implementation example for that.
Html Local Storage Implementation

HTML Grab picture from static URL - From, input

Okay, so the thing is, I have a camera connected localy. Every time I make a request for the static URL it will always provoid a new picture.
So basicly, the picture is a static input...
I would like to be able to click on a lable (My input is hidden (CSS)) to upload the picture. Futher more, it will go into a editor. I just don't know how to grab the picture from a url.
Snippet is a example, with a static picture (Not the one I will be using localy)
I just need to grap the picture from a input, within my form.
(This is to make ID badges, a localy network setup)
<form action="#" method="POST" role="form">
<input type="file" acccept="images/" class="form-control" id="uploaded-img" accept="image/*">
<div class="upload-button">
<label for="uploaded-img">
<span class="label-text">Velg Bilde</span><span class="upload-icon"><i class="fa fa-upload"></i></span>
</label>
</div>
<input type="text" value="http://nortek.media/1.jpg" class="form-control-2" id="uploaded-img-2">
<div class="upload-button">
<label for="uploaded-img-2">
<span class="label-text">Ta Bilde</span><span class="upload-icon"><i class="fa fa-camera-retro"></i></span>
</label>
</div>
</form>
Thanks for help in advanced!

Upload file with formspree

I am trying to allow users on my website to upload an image with a form.
I have been using formspree (https://formspree.io/)
I receive the name of the image but no image attached to the email.
I'm using:
<label>
Upload Photo
<input type="file" name="uploadField" />
</label>
Has anyone managed to do this?
Formspree currently doesn't support file inputs, but Formsprees FAQ has this advice:
For almost zero work and cheap (or free) prices you can integrate external file upload services into a Formspree form. Uploadcare is one example. If you just create an account and include their widget:
<!-- The best place for this one is your <HEAD> tag -->
<script>UPLOADCARE_PUBLIC_KEY = "demopublickey";</script>
<script
src="https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js"
charset="utf-8"></script>
<!-- This is where the widget will be. Don't forget the name attribute! -->
<input type="hidden" role="uploadcare-uploader" name="my_file" />
Per their documentation, you can use that inside the Formspree form and receive the URL of the document in your email address.
Source: https://help.formspree.io/articles/6199-how-to-do-file-uploads-with-formspree
I'm pretty sure the issue is your enctype isn't defined. Here's an example using a basic HTML form (you'll need some PHP/server side code to process the file):
<form action="your_script.php" method="post" enctype="multipart/form-data">
Image: <input type="file" name="uploadField" />
<input type="submit" value="Submit">
</form>

POST Checkbox value in HTML

I want to post checkbox values to server using html. But my code retrieves nothing. Please help.
<form action="Default2.aspx" method="post" >
<input type="checkbox" name="attempt" value="101"> I'st attempt<br>
<input type="checkbox" name="attempt" value="102" checked> 2nd attempt<br>
<input type="submit" value="Submit">
</form>
They need ID's so they can be referred to and if this is a Web Forms website you need to also have the attribute runat="server" for both of them otherwise you won't be able to access them.
ASP.NET Page already has form element in the root, and you don't have insert it by self. If you use native HTML element in your ASP.NET page or control, you can get their values by using Request Object. See simple example here How-get-input-text-value-server-side-c.aspx
In plain HTML forms, checkbox input controls don't get included in the submission at all if the user left them unchecked. See this question: Does <input type="checkbox" /> only post data if it's checked?

Upload image by directly entering a image URL?

I have used a input file code to upload image to my wallpaper site..
<input type="file" name="img" id="img" />
Is there anyway to select a image without selecting image file..like entering URL to text box?
<input name="img" type="text" id="img" value="http://www.somesite.com/image.my.jpg" size="40" />
I tried its not working...please help me! Anyway to enter image url to text box except select browse button and selecting image file? help me i tries in different ways...
You will need to add support for this on 'somesite.com'. This is not something you can solve with HTML, it needs to be solved on the server-side.