Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am horribly new in HTML and I want to implement a source code on HTML, which allows the user to choose content in different languages (basically EN and GER).
So far I found this to give the user the opportunity of choosing a language.
<form action="<?php echo $_SEVER['PHP_SELF'] ; ?>" method="POST">
<label><input type="radio" value="de" name="language"> DE</label>
<label><input type="radio" value="en" name="language"> EN</label>
<input type="submit" value="Ok" />
</form>
How can I add the text now?
So the user should be able to choose a language by putting a tick in a box or whatever and then only see the text in the chosen language.
Could u guys show me how to connect the selectable box with the texts?
Regards! Sascha
Is your question its just how to change text in different language this link could be a good starting point.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Below are two HTML snippets to let the user choose a language for the page:
one uses <select> and <option>s,
the other uses a <div> and alternated <input>/<label>s.
What I plan to do is pick one of those (or a better one, if one exists) and use CSS to customize the appearance of it such that something like the following would appear at the top right of the page, i.e. all alternatives should be show at the same time all the time on the page.¹
I any of 1 and 2 which is to be objectively preferred over the other?
Are there any pro and cons of 1 vs 2?
<select name="language" id="language" value="ENG">
<option>ITA</option>
<option selected="selected">ENG</option>
<option>FRE</option>
</select>
<div class="language">
<input type="radio" id="italian" name="fav_language" value="ita">
<label for="italian">Italiano</label><br>
<input type="radio" id="english" name="fav_language" value="eng" checked="checked">
<label for="english">English</label><br>
<input type="radio" id="french" name="fav_language" value="fre">
<label for="french">Français</label><br>
<div>
¹ I've obtained this static image via a <ul> with 3 <svg>s inside a corresponding <li>, so I haven't bothered adding something like an external shadow to mark the selected language, but I'd do it at some point.
As you want to freely style your language selector by means of showing all options at the same time through flag images I think none of the above options are the best choice. There's no need to get complicated. Try a div and a links solution to better fit your goal.
Something like </div><ul class="languages"><li class="nav-item">English /a></li><li class="nav-item"><a href="#french">french</li></ul>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I just want to log submissions to like a txt that I can look at in github, I want a submission form like: Password & email, then when you click okay, it logs it into like a txt file in github, with "email:password" format.. Anyone know how to do this? I would really appreciate it!
Here is my code so far:
<div class="shopping-input input-text">
<input type="text" placeholder="Enter your Minecraft username." name="username" maxlength="16">
</div>
<div class="shopping-continue element_button">
<div class="l"></div>
<div class="r"></div>
<div class="button_block">
<a>Continue</a>
</div>
</div>
From your comments, it seems as though you don't have much experience with forms or web development in general.
You say you want to "log" it to a text file. This is generally not the best idea, because text files are usually easily accessible and readable to the public. It's best to use a database instead.
However, to either use a text file or a database, you're going to need a server-side language that can interact with the server (such as files). The tagged languages "HTML" and "CSS" will not help you out with the form submission — they are client-side languages that help with the formatting of the page and only interact with the user to the browser, and cannot edit files.
PHP is an example of a server-side language. You should read up about it and file IO.
Assuming you do know how to use PHP, this would be a very simple example:
HTML FILE: index.html
<form action="action.php" method="post">
Enter your name here: <input name="name" type="text" />
<input type="submit" value="Submit" />
</form>
PHP FILE: action.php
<?php
$name = $_POST["name"];
$file_to_write = fopen("name_file.txt","w+");
fwrite($file_to_write, $name);
fclose($file_to_write);
?>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
<form action="quiz.cfm" method="get">
<fieldset>
<legend>Your Details</legend>
<div>
<label for="What is the length of a banana?">What is the length of a banana?:</label><br>
<input type="text" name="What is the length of a banana?" value="" maxlength="100" /><br>
</div>
<div>
<input type="submit" value="Submit" />
</div>
</fieldset>
</form>
Hello.
That is the code I have so far.
I want to know what I am supposed to do to actually get the answers, send them to my e-mail for example.
Thank you in advance,
Iluvpresident
The code below should be incorporated into the "quiz.cfm" page.
<cfmail
from="fromemailaddress"
to="toEmailAddress"
subject="A new form entry has been submitted">
A customer inquiry was posted to our website:
Text : #Form.answer#
</cfmail>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I want to make a HTML page with two components on it: Button and Edit. If I press on button then OpenDialogFile executes. After choosing a file, I want to see it's full path (f.e. "C:/temp_folder/superText.txt") inside my Edit.
<body>
<h1>FileCreator Page!</h1>
<form action="createCSV" method="get">
<input type="text" name="fileName" value="D:/">
<input type="file" value="Choose CSV" title="Choose"> <!-- title is not working-->
<input type="submit" value="Load file into DB">
</form>
<body>
Due to security reasons you can not set a value for an input type file tag.
Look at this thread for further information to this topic: set value for input type file
Also there is no attribute called "title", the text shown on the button is predifined by the browser and can not be changed.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have magento commerce, and I am creating in html an automatic e-mail that is going to be sent when someone signs up (in Dreamweaver).
In the HTML code I have a button that is about subscribing in our newsletter. What is the code that I have to link to this image, so if someone clicks on it he will subscribe to the newsletter.
Thanks in advance,
Frank
The call goes to:
http://yourdomain.de/index.php/newsletter/subscriber/new/
But form data is sent via post as you can see in the Mage_Newsletter_SubscriberController newAction, where you find the following line of code.
$this->getRequest()->isPost() && $this->getRequest()->getPost('email')
So you need to name your form field 'email'
Good luck!
Edit:
Just use something like this:
<form action="http://yourdomain.com/index.php/newsletter/subscriber/new/" method="POST" id="newsletter-validate-detail">
<input type="text" class="input-text required-entry validate-email" name="email" id="newsletter">
<input type="image" src="path to image" name="submit" />
</form>