Hi SC-fans,
i’m looking forward to the best-practice for a help system for every fields. The help content for a field (the “?” tag behind a field) should be saved at the database. Later somebody without scriptcase can write the article with a sc grid/form.
Current i realize it with a short sql-code in onApplicationInit and a [helpX] in the field-config:
$seite = “form_app_firma”; // How can i get the name of the application? Constants, specific variable?
sc_lookup(my_data, “SELECT
hilfe_id,
hilfe_seite,
hilfe_titel,
hilfe_text
FROM
app_hilfe
WHERE
(hilfe_seite = '”.$seite."’)
ORDER BY
hilfe_id");
if ({my_data} === false)
{
echo “Access error. Message=”. {my_data_erro} ;
}
elseif (empty({my_data}))
{
echo “Kein Hilfetext gefunden”;
}
else
{
{Hilfefeld} = {my_data[0][0]};
[Hilfetitel] = {my_data[0][2]};
[help1] = {my_data[0][3]};
[help2] = {my_data[1][3]};
[help3] = {my_data[2][3]};
[help4] = {my_data[3][3]};
[help5] = {my_data[4][3]};
}
I think, it’s ok but not really very comfortable for a form with 25 fields or more, 3 master-detail-forms…
Do you have some better solutions / ideas? Perhaps a connection between the field and a function?
Thanks!
Lars

![CropperCapture[5].png](/uploads/default/original/2X/0/0a2bf19a75c16c0a67271a7a92a44daf70795a1a.png)
![CropperCapture[4].png](/uploads/default/original/2X/5/5a6d02deb2bc4697a17ee4e2acdaf79c4751d2ee.png)
![CropperCapture[3].png](/uploads/default/original/2X/4/4b393321415f94de61e1173b9e1b7fee6240baf1.png)
![CropperCapture[2].png](/uploads/default/original/2X/b/b84786401d4200fcb0f188db00fc4763709fc381.png)
![CropperCapture[1].png](/uploads/default/original/2X/b/b02b28e276bc848c832fc76fa1e722a6e8ff70f0.png)