HTML Grab picture from static URL - From, input - html

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!

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

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

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>

Form not working on Mobile Device

I created a website called diditdrop.com. Within the website there is a form where the user enters a number and then submits the number. On the desktop version of the site, the form works great. On the mobile version, the form is not responsive (i.e. i tap on the screen and nothing focuses or pops up. Additionally, the button underneath it doesn't work either).
I'm not sure what to do. I've been stuck on it for a few hours now. I've pasted a snippet of my code below, however, it doesn't look too strange. If someone could take a look at my site, and then recommend a better way of implementing, I would sincerely appreciate it.
<form class = "form-inline" action="https://formspree.io/x#gmail.com" method="POST">
<div class= "form-group">
<span>
<input type="tel" id = "form1" placeholder="digits here" tabindex="1" class="boxed form-control" name="number"/><br>
</span>
<span>
<input type="submit" id = "buttonmove" class="btn boxed" value="get dat new new"name="number" />
</span>
</div>
</form>
Add the following code it will work:
add the style="float:left" to the image like below
<div id="pictureface" class="col-lg-6">
<img style="float:left" class="img-responsive" src="http://static.stereogum.com/uploads/2016/09/CtUYD4uWYAIB1MH-1475280486.jpg">
</div>

How to do a submit on a contact us form, rails 4

I am a newbie in ror, working on a simple static page showing a portfolio of images. Its one long static page, at the end of the page I am trying to add a contact US form, I found some code like this
<div id="contact"> <span class="largetext section">CONTACT</span> </div>
<div class="horizantal_rule"></div>
<div class="container">
<form action="http://Somesite/form.php" method="post"> // This is the area I need to replicate in rails 4
<div class="cf_left">
<label for="cf_email">Email Address</label>
<input class="login-form1" type="text" name="cf_email" id="cf_email">
<label for="cf_name">Name</label>
<input class="login-form1" type="text" name="cf_name" id="cf_name">
<label for="cf_industry">Industry</label>
<input class="login-form1" type="text" name="cf_industry" id="cf_industry">
</div>
<div class="cf_center">
<label for="cf_message">Your Message</label>
<textarea class="login-form1" type="text" name="cf_message" id="cf_message"></textarea>
<input class="login-form1" type="submit" value="">
</div>
<div class="cf_right">
<p>Contact Us Directly</p>
info#somesite.com
</div>
</form>
</div>
Now in the HTML code the form action is using a php form, I am assuming I am replacing this with rails functionality, Can someone give me a good simple solution just to perform a mailto to task or just forward the data entered to a specific email?
Thanks.
There are many ways to approach this problem, but the simplest is arguably:
create a ContactsController to handle form submission, error handling and redirection
add the appropriate routes for your controller action
use form_tag to construct and wire up a form in your static page
add input elements to your form using the various form helpers
From here, you could investigate making your form remote (i.e. AJAX), creating a Contact RESTful resource and adding unit/integration tests.

.asp postback address in browser

EDITED: Java httpPost into .asp form
I am trying to understand .asp a little
I have this code for the webpage with the login form and a postback action.
Lets assume that the webpage is www.xxx.com/index.asp
<form method="post" id="form1" name="form1" action="">
<div id="login" class="box">
<div class="header">Log in</div>
<div class="content">
<label for="txtUser">User:</label>
<input id="txtUser" name="txtUser" type="text" size="13" value="" />
<label for="txtPassword">Password:</label>
<input id="txtPassword" name="txtPassword" type="password" size="13" value="" />
<input id="BLogin" name="BLogin" type="submit" value="Log in" />
</div>
<div class="footer">
<input type="checkbox" id="chkSave" name="chkSave" /> <label for="chkSave">Save account</label>
</div>
</div>
</form>
So as i understand, if I want to fill the fields in the browser window, i must call:
www.xxx.com/index.asp?txtUser=boris&txtPassword=boris&BLogin=Log in
But nothing simmilar is ever executed in the browser. What is wrong with me thinking in that way? :)
EDIT: Seems that not all the input fields must be filled in before doing POST. Probably this depends on the server, when logging in, if service requires for example 'rememmber me' field every time, then it probably must be filled in.
The form method is "POST", which means that the form data is sent in a special data block within the HTTP request, not as part of the URL. If you change the method to "GET" the data will be encoded in the query string.
More information: http://www.cs.tut.fi/~jkorpela/forms/methods.html