Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help with module validation

Featured Replies

Hey everyone,

Could someone please help me here, I have created a module that will install a Manufacturer logo carousel. You can see the module in action here: https://www.orren-life.com

I am however struggling to validate the module config form and display any errors. I used the PS module generator to get a module template, however I did not see any form validation code in there.

Does anyone have validation code examples for me? I have looked at other modules, however none of these are written like the generator creates teh functions.

Yup a you guessed, I don't have much experience in OOP PHP

Would appreciate any help.

Check getContent() function. You are probably calling postProcess() in that function and than outputing the renderForm. So you can have what ever you need either in the postProcess or in the getContent.

  • Author

Thanks,

I had a look at the generator files that were created (I used the generic Module template as I don't understand what the service module would be for).

So essentially the getContent refers to renderForm, which then calls getConfigForm. Then there is getConfigFormValues and finally the postProcess.

I was trying to write the validation script in there. Which I successfully did do, however I was unable to output the values of the error message, when it found the error. So all it was doing is refreshing the form and imputing default values instead of showing the error.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.