Jump to content

Search the Community

Showing results for tags 'textarea'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 10 results

  1. Hi I am currently using bootstrap to design a landing page. I want to add a contact us form and I need to use a text area for long messages. When I use it with bootstrap it just appears as a single line and not a large field. How can I style just 1 field instead of all of them? This is my HTML code. <form> <div class="form-horizontal"> <label for="Name">Your Name</label> <input type="text" class="form-control" id="Name" placeholder="Name"> <label for="Email">Your Email</label> <input type="Email" class="form-control" id="Email" placeholder="Email"> <label for="Message">Message</label> <input type="textarea" class="form-control" id="Message" placeholder="Message"> </form>
  2. Hi there , im trying to submit textarea to the database , all is going good but there is problem in textarea row in database i think settings lacks , but i don't know what settings to use for that ,,, following is my php : <?php include("include/header.php"); if(isset($_POST['submit'])) { $name = $_FILES['file']['name']; $temp = $_FILES['file']['tmp_name']; move_uploaded_file($temp,"upload/".$name); $poster = "upload/$name"; $title =$_POST['title']; $director =$_POST['director']; $producer =$_POST['producer']; $writer =$_POST['writer']; $music =$_POST['music']; $genere =$_POST['genere']; $story =$_POST['story']; $cast =$_POST['cast']; $id = uniqid(); $date = date("Ymd"); $query = "SELECT * FROM movies WHERE title='$title' "; $result = mysqli_query($GLOBALS["___mysqli_ston"], $query) or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); if (mysqli_num_rows($result) ) { print 'Content Already Added'; } else { mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO movies (id,title,poster,story,director,producer,writer,cast,music,genere,date) VALUES ('$id','$title','$poster','$story','$director','$producer','$writer','$cast','$music','$genere','$date')"); } echo"Content Added"; } ?>
  3. Hi. I don't know how to have the code </textarea> INSIDE of a textarea using PHP. $edit_content_de = "<textarea>Text</textarea>asd"; <p><?php echo '<textarea name="content" id="codeTextarea" style="width:90%; height:500px;">'. $edit_content_de; .'</textarea>'; ?></p> But obviously what happens is the textarea ends and BELOW the textarea it says "asd". How do I stop this and have it say </textarea> INSIDE textarea instead of closing it?
  4. <!DOCTYPE html> <html> <head> <script> function HideComment() { document.GetElementById("comments").hide("textarea") } </script> </head> <body> <textarea name="" cols="" rows="" id="comments" onClick="">leave comment</textarea> </body> </html> i am trying to get the text area to hide when i click a button. this is what i have but doesnt seem to work. can someone help me?
  5. Hello there; i'd like to make it possible to write all the inputs i write with this text fields but make it in a single row (on a textarea), and make it possible to add multiple "events" in my website instead of one! For example: FIRST ROW IN TEXTAREA: Date - Local Team - Away Team - RatioLocal - Draw - RatioAway - SportID - League SECOND ROW IN TEXTAREA: Date - Local Team - Away Team - RatioLocal - Draw - RatioAway - SportID - League This would be a textarea example: 2013/04/03 21:00 Bolivar The Strongest 2.20 3.20 2.88 1 LFP 2013/04/03 21:00 La Paz Oriente Petrolero 4.33 3.50 1.73 1 LFP 2013/04/03 21:00 Wilstermann Universitario 1.91 3.40 3.60 1 LFP Here are the files i use; you will get my idea as soon as you see them Agregar.php: http://pastebin.com/xeTyjrX8 Config.php: http://pastebin.com/Tyb8SXuQ Please if you need more information ask me about it! Thanks a lot for your help!
  6. Dear all, I have having a text area field which has a limit of 100 characters only. Now, i also want to validate it such that it should only contain letter's (alphabet A-Z .a-z). It should not contain any number or @ symbol. If such things entered it should throw me an error saying invalid arguments like that. I know it can be done with regular expressions. But i m not aware of how to do. Can some one help with that. Here is my script. <script language="javascript" type="text/javascript"> function limitText(limitField, limitCount, limitNum) { if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum); } else { limitCount.value = limitNum - limitField.value.length; } } </script> <tr> <td valign="top" align="left">Description</td> <td valign="top">:</td> <td align="left"><textarea name="limitedtextarea" onkeydown="limitText(this.form.limitedtextarea,this.form.countdown,100);" onkeyup="limitText(this.form.limitedtextarea,this.form.countdown,100);"> </textarea><br> <font size="1">(Maximum characters: 100)<br> You have <input readonly type="text" name="countdown" size="3" value="100"> characters left.</font></td> </tr>
  7. Dear all, I have having a text area field which has a limit of 100 characters only. Now, i also want to validate it such that it should only contain letter's (alphabet A-Z .a-z). It should not contain any number or @ symbol. If such things entered it should throw me an error saying invalid arguments like that. I know it can be done with regular expressions. But i m not aware of how to do. Can some one help with that. Here is my script. <script language="javascript" type="text/javascript"> function limitText(limitField, limitCount, limitNum) { if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum); } else { limitCount.value = limitNum - limitField.value.length; } } </script> <tr> <td valign="top" align="left">Description</td> <td valign="top">:</td> <td align="left"><textarea name="limitedtextarea" onkeydown="limitText(this.form.limitedtextarea,this.form.countdown,100);" onkeyup="limitText(this.form.limitedtextarea,this.form.countdown,100);"> </textarea><br> <font size="1">(Maximum characters: 100)<br> You have <input readonly type="text" name="countdown" size="3" value="100"> characters left.</font></td> </tr>
  8. I've been working on a project here oplinfo.hj.cx/insert_test.php When a user is adding a game and it's compatibly information to the database, I'm able to make check boxes and radio button selections mandatory, as well as specify the min/max characters for a text field. <script Language="Javascript"> <!-- function CheckGameCode() { // Check the length of the value of the element named text_name // from the form named form_name if it's < 10 and > 10 characters // display a message asking for different input if ((form1.gamecode.value.length < 10) || (form1.gamecode.value.length > 10)) { // Build alert box message showing how many characters entered mesg = "You have entered " + form1.gamecode.value.length + " character(s) for Game Code\n" mesg = mesg + "Valid Game Code entries are 10 characters.\n" mesg = mesg + "Please verify your input and submit again.\n" mesg = mesg + "Example: SLUS-12345" alert(mesg); // Place the cursor on the field for revision form1.gamecode.focus(); // return false to stop further processing return (false); } // If text_name is not null continue processing return (true); } --> </script> <script language="Javascript"> function formCheck(formobj){ // Enter name of mandatory fields var fieldRequired = Array("gamename", "gamecode", "region", "comp", "vmc"); // Enter field description to appear in the dialog box var fieldDescription = Array("Game Name", "Game Code", "Region", "Result", "VMC Support"); // dialog message var alertMsg = "Complete the following fields:\n"; var l_Msg = alertMsg.length; for (var i = 0; i < fieldRequired.length; i++){ var obj = formobj.elements[fieldRequired[i]]; if (obj){ switch(obj.type){ case "select-one": if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; case "select-multiple": if (obj.selectedIndex == -1){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; case "text": case "textarea": if (obj.value == "" || obj.value == null){ alertMsg += " - " + fieldDescription[i] + "\n"; } break; default: } if (obj.type == undefined){ var blnchecked = false; for (var j = 0; j < obj.length; j++){ if (obj[j].checked){ blnchecked = true; } } if (!blnchecked){ alertMsg += " - " + fieldDescription[i] + "\n"; } } } } if (alertMsg.length == l_Msg){ return true; }else{ alert(alertMsg); return false; } } </script> and the form <table width="830" border="0" bgcolor="#003131" align="center"><form action="insert_action.php" method="post" name="form1" id="form1" onsubmit="return !!(CheckGameCode() & formCheck(this));"> <tr> <td width="174" height="38" bgcolor="#003a39"><strong> Game Name / Game Code</strong></td> <td width="438" bgcolor="#003a39"> <input name="gamename" type="text" id="" size="40" maxlength="35" /> <input name="gamecode" type="text" id="gamecode" size="10" maxlength="10" /></td> <td width="204" bgcolor="#003a39"> For gamecode: <a href="http://www.sonyindex.com/index.htm">Sony Index</a><br /> Enter using 10 chars: ABCD-12345</td> </tr> Now what I'd like to do is make the "gamecode" text field require a certain character such as "-", rather then only requiring 10 characters.. more specifically, I'd like the first 4 characters required to be a letter (A-Z), the 5th character to be a "-" and the last 5 to be integers.. else the form does not submit. I'd like to eventually use these gamecodes to guarantee no duplicate entries into the database, and also proper format (example: ABCD-12345) if I ever decide to loop and display the row on the web page. The required format would be help against people just typing 10 random characters or using different gamecode format (ABCD_123.45), since duplicate entry validation will depend on the accuracy of these gamecodes. Is this possible with Javascript? If yes, how might I go about implementing these requirements.
  9. When I insert a break <br> it shows up as <br> in the textarea. The info is coming from the database. How the info is ran through before adding to database (just in case you need this): $bandbio = mysqli_real_escape_string ($mysqli, $_POST["bio"]); $bandbio = strip_tags($bandbio, "<br /><p><a><b><u><s><br><i>"); $bandbio = rtrim($bandbio); Once taken from the database this is what the info goes through before displaying info in textarea: $bandbio = htmlspecialchars($bandbio); $bandbio = addbreaks($bandbio); //adds the break tag where needed echo $bandbio; So how would I make it so the <br> does not show up as html but actually shows as a line-break? For Example (this is what I would put in the text area): Some[press enter] text To show up as: Some text And not (like it is currently): Some<br> text
  10. I badly need help... I am making a basic text editor of my own. I have an Iframe where users can type their code in it. Below the Iframe, there is a div which is hidden. This div normally will capture what is written in the IFrame, in other words, every HTML and CSS codes the user will type in the Iframe above, it will take action "onkeyup" in the div below. Now the div below, as it is hidden, it will only be previewed if the user click on a button. As a result, this will pop up in a JQuery dialog box. In short, the div will be pop up through a dialog box of JQuery UI to show the user the result he/she is coding. I know we can do this in textarea, it is just a matter of "value" but I am not getting it with Iframe. I made this: function pcode () { var frame = document.getElementById('code').value; var div = document.getElementById('preview'); divout.innerHTML = frameout; } The above code, is just to grab the value written in the Iframe, then preview it in the div below on onkeyup. Now, the code to preview the div in a JQuery UI dialog box once the user clicks on a button: function preview() { $('#preview').dialog({modal:true, height:600, width:1280, title:"Preview", show:"slow", hide:"fast"}); } $('#previewbutton').click(function() { preview(); }); The problem is nothing is working. If you have not understood the issue, you can ask me some questions, I am myself stressed with this. Everything would be OK if it was a textarea as I did this before with textarea and was fine. In the same line of thought, I have been advised to use IFrame when coding a text editor, because if I do this with a textarea, the user's code can have conflicts with my own CSS codes of the page. I want to know if there a possibility to use textarea alone instead of Iframe, in case there is no solution, but the user CSS and HTML codes must not have conflicts with my own CSS codes. For example, if I have declared a class or ID or made all Heading 1 blue for instance, and if the user is typing Heading 1 tag in a textarea, the CSS codes of mine will apply to the user as well, so I don't want this. Thank!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.