Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Adding a Formaction in cms?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 917 Views
  • Rajid
    Avatar
    Community Member
    2 Posts

    Adding a Formaction in cms? Link to this post

    Hello!

    I have almost migrated my whole site from my old crappy CMS to Silverstripe. Everything has worked like a charm. Until the final last task.

    I have a script running in the background collecting data from various sources. This script is triggered from the CMS.

    I have understood from other posts in this forum that the way to call actions in the CMS is to insert an iframe. However, my CMS is located on a different domain for security reasons and therefore i cannot use iframes.

    Are there any other way to trigger an action in the CMS except with iframes?

    All the field in the admin is created using getCMSContent as described in the tutorial, and i just want to have one button, calling a method.

    Are there any good ways to archieve this?

  • Rajid
    Avatar
    Community Member
    2 Posts

    Re: Adding a Formaction in cms? Link to this post

    Doesn't anyone know a solution or haven't i described the problem well enough?

    My current solution is to have an action on the regular domain, eg. www.mydomain.com/dobackground job. Which i call when i want the job to be run. But there must be a way to call an action in the admin interface, which is at admin.mydomain.com.

    I would be more than happy if someone just could point me in the right direction. It's acctually quite advanced to figure this one out by myself by just looking at the code, without acctually really knowing where to look.

    Thanks in advance.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Adding a Formaction in cms? Link to this post

    I don't know why <iframes> wouldnt work for your case here - just use a custom controller rendered in the iframe, maybe with a small SilverStripe form (or even just a link) to trigger the action. Neither of those solutions impose domain restrictions. Inserting an iframe in getCMSFIelds() is usually done via LiteralField, we don't have a dedicated formfield for iframes.

    917 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.