Check if a Database Record Already Exists Before Inserting a New Entry

Add a new line after this

Then paste in this please

<link rel="stylesheet" href="dmxAppConnect/dmxValidator/dmxValidator.css" />
<script src="dmxAppConnect/dmxValidator/dmxValidator.js" defer=""></script>
1 Like

great it worked!.. :slight_smile: thanks for the help psweb… appreciate it.

how come this script is missing when doing partials.?

Great news, glad it’s working.

To be honest I am not sure why it is missing, because this code

Should be telling Wappler to add those scripts into the head of the main layout page.

The Wappler guys would have to look into that to figure out why it didn’t, but it is a common enough issue that I knew to look for that as a possible cause.

1 Like

i had similar issue years ago i think with PHP. Glad that you helped me. now i know what can be go wrong in this validation issues, specially with partial setup.

1 Like

Hi @thines, I’m glad that it’s working for you now. Sorry, I couldn’t be of much help to you; I don’t have any understanding of how to use nodejs code.

Thank you @psweb for your help; I’m sure this post will be a great help for anyone who may come across similar issues :+1:

2 Likes

This part is done automatically when any validation attribute is added to a layout page or a content page or a partial.
It could be that you did not add the partial to the layout page when your added validations.
Or maybe you missed the change and did not save the layout page.
If your layout page is closed when making changes to content/partial, the layout page is opened automatically with the changes made - pending a save, which you have to do manually.

This happens for all components that require any additional styles or scripts to be added. I have never had any issues with it to be honest. Could be an issue with one of the latest versions. See if you can reproduce & post a separate bug report for the same.

1 Like

That is the most common problem. If you have linked the partial/content page to your main, then the scripts will be auto added. If not linked, well they won’t be auto added as we have no idea what your main page is.

1 Like

Yeah it’s only really happened to me with the validator scripts once or twice, it seems to happen more often with this collapse script, for some reason I often find that one missing.

<script src="dmxAppConnect/dmxBootstrap4Collapse/dmxBootstrap4Collapse.js" defer=""></script>
1 Like

Personally i always keep the layout page open when working on Views/ Partials. That way i get a visual confirmation that the component has been added to the layout as the blue circle shows it needs to be saved. If not, with the layout open, i just add the component to the view/ partial again, save the layout then remove the component copy i added and it tidies things up

1 Like