Skip to content

Commit

Permalink
Resolve the sections not in a seperate span loading in the edit secti…
Browse files Browse the repository at this point in the history
…on form. Closes #339
  • Loading branch information
iTerminate committed Jan 14, 2025
1 parent 644c8f0 commit 5fb3280
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/javascripts/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,13 @@ function section_edit($cgr) {
var legend = 'Section name';
if ($cgr) {
legend = $('legend span.label-text', $cgr).text();
if (legend === '') {
prefix_length = $('legend span.section-number', $cgr).text().length;
prefix_length += 1;

complete_legend = $('legend', $cgr).text();
legend = complete_legend.substr(prefix_length);
}
}
var $section = $(input.section());
var $legend = $(spec.legend());
Expand Down

0 comments on commit 5fb3280

Please sign in to comment.