I've a custom field, and I'm trying to write the validation for the field values. however when a particular field causes the failure, the whole fielset is marked in red. I only want the specific field element to be highlighted, and in the case of Unlimited I only want the specific entry highlighted.   here is the code I have so far. but the whole fieldset is marked in red when ever a validation fails.      function prodlist_field_widget_form(&amp;$form, &amp;$form_state, $field, $instance, $langtype, $items, $delta, $element) {       $base = $element;        if ($instance['widget']['type'] == 'prodlist_text') {         $element['#element_validate'] = array('_prodlist_text_validate');           $element['prod_type'] = array(           '#type' =&gt; 'select',           '#title' =&gt; t('Product Type'),           '#default_value' =&gt; isset($items[$delta]['prod_type']) ? $items[$delta]['prod_type'] : NULL,           '#options' =&gt; type_options(),           ) + $base;          $element['prod_description'] = array(           '#type' =&gt; 'select',           '#title' =&gt; t('Description'),           '#default_value' =&gt; isset($items[$delta]['prod_description']) ? $items[$delta]['prod_description'] : NULL,           '#options' =&gt; description_options(),           ) + $base;          $element['order_amount'] = array(           '#type' =&gt; 'textfield',           '#title' =&gt; t('Amount'),           '#default_value' =&gt; isset($items[$delta]['order_amount']) ? $items[$delta]['order_amount'] : NULL) + $base;       }       return $element;      }   function _prodlist_text_validate($element, &amp;$form_state) {    if ($form_state['complete form']['#form_id'] == 'field_ui_field_edit_form') {     return ;   }    $values = $form_state['values'];   $language = $values['language'];   $field_name = $element['#field_name'];   $field_name_error_box = $field_name;    foreach ($values[$field_name][$language] as $delta =&gt; $item) {      if (isset($item['order_amount'])) {        if (is_numeric($item['order_amount'])) {         if($item['prod_description'] != 'no order' &amp;&amp; $item['order_amount'] &lt;= 0 ){           form_set_error($field_name_error_box, t('Order amount has to be more then 0'));         } else if ($item['prod_description'] == 'no order' &amp;&amp; $item['order_amount'] &gt; 0) {           form_set_error($field_name_error_box, t('You have created an order amount without selecting a product.'));         }         } else {         form_set_error($field_name_error_box, t('Order amount has to be numeric'));       }    }    }  }   I'm trying to set the variable $field_name_error_box = $field_name; to the correct value but it either lights up the whole form section or nothing at all.   I've tried the following, and lots of other variants without luck.  $field_name_error_box = $field_name . 'order_amount';
When validating a field manually from my form a error is displayed but the field doesn't get red. For the first parameter i used the name of the input element. DRUPAL 7  if($form_state['values']['panes']['webform_nid31'][0]['contact_person'] == '') {     form_set_error('panes[webform_nid31][0][contact_person]', t('You must select a name for this group of settings.'));   }
Prove that the sum to $n$ terms of a sequence:  $$\frac{1^2}{1\times 3}+\frac{2^2}{3\times 5}+\frac{3^2}{5\times 7}+\cdots $$ is  $$ \frac{n(n+1)}{2(2n+1)} $$ Programmatically create a user and assign a role What happened to the Grid at the end of Tron Legacy? I made an svg in Illustrator, but now I want to use it in a website/app but it's a huge size (around 10 MB) how can I decrease the size of it? My illustrator file is pretty big but that because I have some tracing elements underneath. The file also has a big artboard, but when I save should I delete my tracing elements, and decrease the artboard size? Why is negative times negative = positive? NSString tokenize in Objective-C I would like to align the view straight on to a face, perpendicular to the normal. How do I align the 3D viewport to the face of a mesh? Impossible to hide navigation bars in Safari iOS 7 for iPhone/iPod touch What is the fastest way to convert float to int on x86 What is the fastest way you know to convert a floating-point number to an int on an x86 CPU.  Preferrably in C or assembly (that can be in-lined in C) for any combination of the following:   32/64/80-bit float -> 32/64-bit integer   I'm looking for some technique that is faster than to just let the compiler do it. How can I make my microSD card writable? Calculate the limit of two interrelated sequences? I'm given two sequences:  $$a_{n+1}=\frac{1+a_n+a_nb_n}{b_n},b_{n+1}=\frac{1+b_n+a_nb_n}{a_n}$$  as well as an initial condition $a_1=1$, $b_1=2$, and am told to find: $\displaystyle \lim_{n\to\infty}{a_n}$.  Given that I'm not even sure how to approach this problem, I tried anyway. I substituted $b_{n-1}$ for $b_n$ to begin the search for a pattern. This eventually reduced to:  $$a_{n+1}=\frac{a_{n-1}(a_n+1)+a_n(1+b_{n-1}+a_{n-1}b_{n-1})}{1+b_{n-1}+a_{n-1}b_{n-1}}$$  Seeing no pattern, I did the same once more:  $$a_{n+1}=\frac{a_{n-2}a_{n-1}(a_n+1)+a_n\left(a_{n-2}+(a_{n-1}+1)(1+b_{n-2}+a_{n-2}b_{n-2})\right)}{a_{n-2}+(a_{n-1}+1)(1+b_{n-2}+a_{n-2}b_{n-2})}$$  While this equation is atrocious, it actually reveals somewhat of a pattern. I can sort of see one emerging - though I'm unsure how I would actually express that. My goal here is generally to find a closed form for the $a_n$ equation, then take the limit of it.  How should I approach this problem? I'm totally lost as is. Any pointers would be very much appreciated!  Edit:  While there is a way to prove that $\displaystyle\lim_{n\to\infty}{a_n}=5$ using $\displaystyle f(x)=\frac{1}{x-1}$, I'm still looking for a way to find the absolute form of the limit, $\displaystyle\frac{1+2a+ab}{b-a}$. Why is AES unbreakable? Distorted circles in axis environment with TikZ With a fresh installation of TeX Live (updated just before writing this post), circles in axis environments are distorted. Consider the following MWE:  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.16}  \begin{document}  \begin{tikzpicture} \begin{axis}[   ymin=-3, ymax=3,   xmin=-3, xmax=3 ]  \draw (1,0) circle [radius=1.5]; \fill (1,0) circle [radius=1];  \end{axis} \end{tikzpicture}  \end{document}   The output looks like this:   Obviously, the circles aren't even circles. I haven't encountered this problem before. Did I do anything wrong while setting up my new system?  EDIT: It's not an issue of using axis equal or not since the axes are scaled more or less equally already. Instead, the circles appear as rotated ellipses that are strongly stretched out in one dimension.  EDIT 2: Here's the output of \listfiles:  article.cls    2019/12/20 v1.4l Standard LaTeX document class   size10.clo    2019/12/20 v1.4l Standard LaTeX file (size option) pgfplots.sty    2018/03/28 v1.16 Data Visualization (1.16) graphicx.sty    2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) graphics.sty    2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2016/06/04 v1.11 sample graphics configuration   pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex     tikz.sty    2020/01/08 v3.1.5b (3.1.5b)      pgf.sty    2020/01/08 v3.1.5b (3.1.5b)   pgfrcs.sty    2020/01/08 v3.1.5b (3.1.5b) everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS) pgfrcs.code.tex  pgfcore.sty    2020/01/08 v3.1.5b (3.1.5b)   pgfsys.sty    2020/01/08 v3.1.5b (3.1.5b) pgfsys.code.tex pgfsyssoftpath.code.tex    2020/01/08 v3.1.5b (3.1.5b) pgfsysprotocol.code.tex    2020/01/08 v3.1.5b (3.1.5b)   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)    color.cfg    2016/01/02 v1.6 sample color configuration pgfcore.code.tex pgfcomp-version-0-65.sty    2020/01/08 v3.1.5b (3.1.5b) pgfcomp-version-1-18.sty    2020/01/08 v3.1.5b (3.1.5b)   pgffor.sty    2020/01/08 v3.1.5b (3.1.5b)  pgfkeys.sty pgfkeys.code.tex  pgfmath.sty     pgfmath.code.tex pgffor.code.tex tikz.code.tex l3backend-pdfmode.def    2020-02-03 L3 backend support: PDF mode supp-pdf.mkii epstopdf-base.sty    2020-01-24 v2.11 Base part for package epstopdf epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live Difference between 'struct' and 'typedef struct' in C++? Is the matrix diagonalizable for all values of t? How to view the system console message after Blender crashes? I am testing a script in Blender game engine. I can view the helpful message on the external system console when the script throws exception. Sometimes the bugs of the script cause the Blender to crash and close the console immediately.    Is there any way to view the message after the Blender crashes? How to write the message to a text file for later viewing? Any suggestion? How can I use 3rd party libraries on QGIS plugins on Windows?   I've developed a plugin that uses rasterio and numpy for a customer, but he's having problems installing rasterio and numpy.  Actually rasterio and numpy were installed in it's main system Python (C:\Python27), but I need QGIS Python to recognize it. Here at the Genealogy and Family History Stack Exchange we see many questions about relationship mapping which is also known as:   relationship calculation kinship terminology etc   If you are just trying to understand how to calculate "cousins and removes" then  provides an excellent guide.  However, if you are seeking an English term for a more complicated relationship between two members of an extended family, rather than asking a question like:          site users are encouraged to first review the answers below.    Note: This Q&amp;A arises from  and is set to  to help make it canonical. Flag indicator present on Meta, but no flags visible It looks as if the 10k-tools flagged post list is b0rken.  Next to the review link in the toolbar there is a flag counter showing there are 10 flags to be reviewed:    Clicking on that flag counter leads to an empty page:        The moment I visit that page (through clicking on the flags counter, or by going to the review queue first then clicking on Tools, selecting the flags tab if not already selected), the flags counter disappears from the toolbar:    but after a while (half an hour, an hour?) the flag count re-appears in the toolbar.  Either the counter is wrong (presumably taken from a Redis cache somewhere) or the 10k flag review page is falling over every time someone tries to load it.  This at first appeared to happen only on Meta, on Stack Overflow the flags page has plenty to review. However, there are now  on Stack Overflow. Probably a really simple one this - I'm starting out with C# and need to add values to an array, for example:  int[] terms;  for(int runs = 0; runs &lt; 400; runs++) {     terms[] = runs; }   For those who have used PHP, here's what I'm trying to do in C#:  $arr = array(); for ($i = 0; $i &lt; 10; $i++) {     $arr[] = $i; }