I use Rubik as an admin theme. I have Open Publish as the default/frontend theme. When I submit a node/edit form that's missing a required field, the error message about the required field is shown on the default/frontend theme. It looks like total crap because the frontend theme is not styled for the node/edit form. I would like to keep the form validation errors on the administration theme. How can this be done?
I have tried:
- Ajax module does the job perfectly, but it causes duplicate nodes when a new node is submitted on my site.
- Clientside Validation module is almost good, but it "misses" some required fields (hierarchical select and cck node reference fields).
The only way to fix the problem is of course to make the "default" theme the administration theme as well. Even though that is ridiculous, it proves that Drupal will always pick the default theme for the form validation error messages. I'm sure this can be changed. I'm sure other people have been annoyed with this as well - those of us who use administration themes.
Comments
Oh dang, what's with all this
Oh dang, what's with all this spam pushing by post down! :) (Not kidding) bump.
Found a fix to this highly
Found a fix to this highly annoying and unsightly problem. This is assuming you have an admin theme set and hence
variable_get('admin_theme', 0);. You can also do$custom_theme = 'theme_name_here';Many thanks to subu.purohit for posting a fix.