1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00

Add PR #255 - updates inputfields.js to add support for repeater 'forpage' selectors in showIf dependencies

This commit is contained in:
adrianbj
2024-02-15 10:50:19 -05:00
committed by Ryan Cramer
parent f801fef42b
commit 94653012be
2 changed files with 7 additions and 2 deletions

View File

@@ -137,7 +137,7 @@ var Inputfields = {
* Are we currently in debug mode?
*
*/
debug: true,
debug: false,
/**
* Are we currently processing dependencies?
@@ -1503,6 +1503,11 @@ function InputfieldDependencies($target) {
var subfield = '';
var fields = []; // if multiple
var values = [];
// For repeaters PR #255
if(field.indexOf('forpage.') === 0) {
field = field.replace('forpage.', '').replace(/\_repeater\d+/g, '');
}
// detect OR selector in field
if(field.indexOf("|") > -1) {

File diff suppressed because one or more lines are too long