NetTalk Central

Author Topic: changing a form theme  (Read 4150 times)

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
changing a form theme
« on: November 05, 2012, 05:30:03 AM »
Hi everyone is there a way to change a particular form or browse theme but leave the rest of the system working using the the theme set in the webserver?

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: changing a form theme
« Reply #1 on: November 05, 2012, 04:10:39 PM »
Hi Olu,

You could jump into the WebHandler, IncludeStyles embed .. And place a new CSS file in there, based on self.PageName, which would come AFTER the normal css styling, and so override it.
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: changing a form theme
« Reply #2 on: November 05, 2012, 09:02:01 PM »
It also kinda depends on how you have used the browse of form. The themes are "page" based, but a single page can include multiple browses and forms (remember that popups are part of the page.)

I guess it could be done with some smart CSS, but I've not tried this yet myself.

cheers
Bruce

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: changing a form theme
« Reply #3 on: November 06, 2012, 04:17:29 AM »
Thanks bruce and stu i have gone with the idea of rolling my own themes and calling them just when i open a form and that works fine. my only problem now it to get it back to the default theme after form closes, as at the moment it carries the the change theme over from the form and i have tried diffrent embed of the form to get it to change back before it closes form. But if i fresh the screen after closing the form it works. Any ideas pls where am going wrong as i think i am not hitting the right embed point before closing the form to change it back before it returns from form.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: changing a form theme
« Reply #4 on: November 06, 2012, 06:53:06 PM »
are your forms popups or pages?

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: changing a form theme
« Reply #5 on: November 07, 2012, 01:07:37 AM »
They are popups , and would like to know solution for pages form as well

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: changing a form theme
« Reply #6 on: November 07, 2012, 10:18:59 PM »
Hi Ole,

I think you'll find pages would be easier because, well, they're pages. (and css applies to a page).

The problem you're having with the popup is because you have to see the popup as "part" of the underlying page, and css applies to pages.

So if you want the popup to be different, probably the best way to handle that is to override the CSS settings of the form itself to new values. ie it's not as east as just "swapping to another theme"  - you need specific css settings for that form.

cheers
Bruce