Dynamic ID (GUID) linking

This commit is contained in:
Oh
2025-02-05 08:47:28 +02:00
parent 752a42b2cb
commit 86a9529ce0
85 changed files with 133 additions and 89 deletions

View File

@@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 1.0.1
@build 4th February, 2025
@build 5th February, 2025
@created 24th May, 2024
@package Subform Power
@subpackage CountryModel.php
@@ -391,6 +391,19 @@ class CountryModel extends AdminModel
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
$initDefaults = $jinput->get('init_defaults', null, 'STRING');
if (!empty($initDefaults))
{
// Now check if this json values are valid
$initDefaults = json_decode(urldecode($initDefaults), true);
if (is_array($initDefaults))
{
foreach ($initDefaults as $field => $value)
{
$form->setValue($field, null, $value);
}
}
}
}
// Only load the GUID if new item (or empty)