Duplicate hidden fields on EditView #5024

Open
opened 2026-02-20 16:28:11 -05:00 by deekerman · 0 comments
Owner

Originally created by @topesantos on GitHub (May 29, 2023).

Issue

When editing, besides the buttons on top and bottom of the page, there are hidden fields also duplicated.
And these fields have the same id. Browsers and javascript don't like fields with the same id.

Expected Behavior

Should be only hidden fields with unique id.

Actual Behavior

There are duplicated hidden fields.

Possible Fix

on
include\EditView\footer.tpl
comment this code

        <!-- to be used for id for buttons with custom code in def files -->
        {{if isset($form.hidden)}}
        {{foreach from=$form.hidden item=field}}
        {{$field}}
        {{/foreach}}
        {{/if}} 

Steps to Reproduce

  1. Open and Edit one module register
  2. See the source code near the buttons.

Context

I had difficulties accessing hidden fields with javascript

Your Environment

SuiteCRM 7.13.3

Originally created by @topesantos on GitHub (May 29, 2023). #### Issue When editing, besides the buttons on top and bottom of the page, there are hidden fields also duplicated. And these fields have the same id. Browsers and javascript don't like fields with the same id. #### Expected Behavior Should be only hidden fields with unique id. #### Actual Behavior There are duplicated hidden fields. #### Possible Fix on include\EditView\footer.tpl comment this code <!-- to be used for id for buttons with custom code in def files --> {{if isset($form.hidden)}} {{foreach from=$form.hidden item=field}} {{$field}} {{/foreach}} {{/if}} #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> 1. Open and Edit one module register 2. See the source code near the buttons. #### Context <!--- How has this bug affected you? What were you trying to accomplish? --> <!--- If you feel this should be a low/medium/high priority then please state so --> I had difficulties accessing hidden fields with javascript #### Your Environment SuiteCRM 7.13.3
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5024
No description provided.