All Questions
36 questions
-1
votes
2
answers
129
views
HTML, Javascript, and PHP - maxlength able to be changed through inspect element
Back with an issue which I'm sure you guys will find easy to fix. Whilst using the maxlength function in html, I noticed that users can simply use inspect element to modify the maxlength deeming it ...
1
vote
1
answer
2k
views
how to limit character length in essential addon for elementor form
I tried to target in php the following form
I tried this code :
Username limit character length.
i also tried this one separatly :
if( strlen( $fields['form_field_password'] ) < 8 ) { return ['...
1
vote
1
answer
1k
views
Display some WooCommerce product reviews with limited content length randomly
I am making shortcode for reviews Based on WooCommerce: Display some reviews randomly on home page to put on other pages. How can i limit reviews by character numbers, like 100 or 200 characters. SO ...
1
vote
1
answer
928
views
Set maxlength for checkout postcode field in WooCommerce
I'm trying to delete or increase the default maxlength (nowadays set to 4) on a WordPress site I developed using Woocommerce.
Up to now I've tried all these functions on my childtheme's functions.php
#...
0
votes
0
answers
74
views
Jquery validate text lentgh : javascript say ok maxlength <= 300 but php count 306
I don't understand why javascript an php aren't agree...
Here is a sample text :
Bonjour,
Je suis ravi de soumettre mon problème à la communauté stackoverflow - franchement c'est la meilleure du web ...
2
votes
4
answers
2k
views
How to prevent User to enter value at maxlength using jQuery
I want that user should not be able to enter text if he has more then 5 comma separated values in input box.
I have reached the value, but not sure. I think maxlength dynamic should do the trick.
I ...
1
vote
1
answer
216
views
How can I set max selection for Yii2 ActiveForm dropDownList?
I am creating a form with this:
<?= $form->field($model, 'job_category')
->dropDownList($jobCategoryDropDown, ['options' => $jobCategoryOptionArray, 'multiple' => 'multiple'])
...
0
votes
1
answer
303
views
PHP $argv[1] empty when called with long content
When I call my php program from the command line using the following command everything works fine:
php app.php 'TEST'
But using a very long argument, PHP returns an empty string for the argument:
...
0
votes
1
answer
722
views
How to set maximum length of wordpress the_title?
I want to set the maximum length of the title in WordPress advance custom field.
I use like this but it was not working :
<p style="position:relative;top:-30px;">
<?php
$...
-1
votes
1
answer
52
views
Set the character length in the field
can anyone help me with this:
Namely, I want to set the length of the character for the Phone field in registration, and in the case if it has more than 10 characters, to display a mistake.
Form:
...
0
votes
2
answers
952
views
How to limit the number of characters displayed inside input text?
I have a PHP string I CANT CHANGE that produces an input with a date like this:
<input type="text" value="2016-07-12 00:00:00" maxlength="10">
I dont need the 00:00:00 part so I used maxlength ...
-1
votes
3
answers
174
views
How to check number of emoticons in textbox in php? [closed]
I am relieving a text from android as post data this may be alphabet or emoticons, how can check that if emoticons then should not be greater than 25 in server side in php.
Please help me
Thanks
1
vote
1
answer
133
views
Product description/name truncated in Prestashop back-office
I'm having a little trouble on one of my Presta website.
When I go to the Active Carte section, and display details of one active cart, the name of the product is truncated, the max is not always the ...
1
vote
1
answer
2k
views
Woocommerce checkout field maxlength, make input number field only (postcode)
I've been struggling with this for a few days now. What I want to do, it to limit the Postcode/zip fields to 4 numbers. So, to add a maxlength and a type="number" to those fields.
Things I've tried ...
1
vote
1
answer
1k
views
How to disable implicit string trimming in doctrine2 entity for string max length?
Using dontrine2, I have an entity having property with following annotations:
/**
* @var string
* @Column(type="string", length=4, nullable=false)
*/
protected $someProperty;
Now when the ...
0
votes
2
answers
81
views
Max-Length for multiple text areas using php and Javascript
I am trying to display the number of characters left in multiple text areas. Although I have different ID's for the text areas, the max length is prompted only for the 2nd text area and not for the ...
1
vote
2
answers
6k
views
Limit number of characters in input field with PHP
I'm creating a database of people using this WordPress Plugin. On the signup form, I want to limit the number of characters the users can input in certain fields, but I don't know how, as I'm not a ...
2
votes
3
answers
105
views
Difference between two time stamps in PHP
It seems to me that this should echo 11 hours but it returns 12; what am I missing?
$start_time = "06:00";
$end_time = "17:00";
$LOD = date("H:i", ((strtotime($end_time) - strtotime($start_time))));
...
0
votes
0
answers
172
views
change maximum length of file upload in php
I have a form with multiple image upload in php. My hosting is a linux server. My problem is that, when I upload more than 5 images, the file name size increase, because I am encrypting the name of ...
8
votes
2
answers
27k
views
Laravel form inputs - how to set maxlength
Maximal length of HTML inputs can be set by:
<input type="text" name="" maxlength="10">
Is there a way how to set maxlength of form input when creating inputs in Laravel way?
{{ Form::text('...
1
vote
1
answer
453
views
Data is getting lost during $.post
I have a list <ul> of articles <li> and an event handler on a button.
When clicking the button, I aggregate all <li>s ID (integer) using:
data.articles = $('#category-articles')....
0
votes
1
answer
67
views
HTTPS URLs longer than 1024 chars work ONLY in Chrome
I've come over a strange behaviour of almost every browser on my laptop - HTTPS URLs longer than 1024 chars work in GC only. FF, IE, Opera, Safari - none of these load the data from the server.
I ...
1
vote
0
answers
179
views
Max Password Length
Since heartbleed came out I have been changing my passwords but typically whenever I try to improve my password the dreaded "Max Password Length" hits me. This got me wondering, why do many websites ...
3
votes
2
answers
4k
views
How do I change maximum length of HTTP GET request to store the params ? Is it possible?
Hi I want to increase the size of the params (in URL) via HTTP GET request.
My requirement is, I am modifying a html form which is already built with few fields and the type of form request is "GET"...
0
votes
4
answers
126
views
PHP - If variable's character is number then do something
I created a PHP page that show names from a table, there is some names is too long, I want to make if $name is 12 characters then replace what after 12 characters with ...
this is my code
$query= ...
2
votes
2
answers
2k
views
Is it bad to limit length when creating email validation code? [duplicate]
I am learning jQuery and PHP to create my own form validation. I have read several tutorials but I do not see any consideration or notation in regards to capping the maximum length? I did see ...
0
votes
1
answer
2k
views
Google short url - max url length
I'm playing with Google URL shortner API, i would like to know if is there any maximum length for the URL returned from google.
I mean, short URLs are called short url because they are short, so they ...
11
votes
4
answers
12k
views
DECIMAL length for microtime(true)?
I want to store PHP's microtime as my timestamp in MySQL.
I've been told it's best to store it in DECIMAL, but I can't find an ideal size.
Does anyone know what the maximum size microtime(true) ...
0
votes
1
answer
74
views
Different MaxLength values [closed]
I have an options panel in my WordPress theme with several text fields. For example: Project title, Project description, Twitter username, etc.
case 'text':
$val = $value['std'];
$std = ...
2
votes
1
answer
27k
views
Check form input length via PHP with maxlength tag
My question is very simple: if I have some input fields with maxlength tag in a HTML form, I have to check input length via PHP too?
0
votes
2
answers
3k
views
PHP - File Get Contents - Setting Maximum Length
I am trying to get the contents of a web page up to the 100th character. However, for some reason the code isn't getting the web page at ALL.
Here's my code:
$link = "http://www.roblox.com/User.aspx?...
3
votes
3
answers
2k
views
Truncate string to maximum length before space or dot to avoid breaking a word
I found the following PHP script create by webbiedave.
// strip tags to avoid breaking any html
$string = strip_tags($string);
if (strlen($string) > 500) {
// truncate string
$stringCut = ...
0
votes
2
answers
3k
views
Limit characters on specific number in a HTML Text with PHP
I am using the CKEditor and I have found/modified a plugin that counts the characters.
I have premium and basic users.
The basic user is limited to 1000 characters and the premium is unlimited, but ...
2
votes
2
answers
178
views
Longer Form Fields in Drupal
I have a really silly problem that has cost me a load of time already.
I have created a content template with a URL in there. When I look at the HTML code for it, I see a big fat "maxlength=256" in ...
12
votes
3
answers
24k
views
log_errors_max_len = 1024 in php.ini, but php log keeps growing
As the title says, I've set the max length for the php error log, but it seems to keep growing much much larger than 1024. I am using the correct php.ini, I've restarted apache, etc. The permissions ...
4
votes
3
answers
2k
views
If HTML maxlength is 110, why can I input 114 characters?
<input type="text" id="title" name="title" size="50" maxlength="110" />
You see, the maxlength is 110, but I was shocked when I found that I input 114 characters when I used
echo strlen($...