This question about Not sure...: Answered

Remove Action Button after use

Hello, is there any option to remove this button automatically after it was clicked once?

-- AbhilashaKerkmann - 07 Jul 2020

I can think of a couple possible approaches to achieve what you're after. The first one is to use an IF marco to test is the new topic exist and, if not, display the button to create it. The Code would remain after creating the topic, but would not be visible. You could also using INCLUDE to minimize the code that's in the base topic.

Another possible option is using the "remove" parameter in a custom CommentPlugin template. This is a slightly un-conventional use of CommentPlugin but I think it should work as it can create a new topic if the topic specified in the "target" parameter doesn't exist. You might need to include a hidden text field containing whatever text you want to include in new topic (taking the place of using templatetopic).

Let us know if you have any further questions or run into problems with one of these approaches.

-- LynnwoodBrown - 07 Jul 2020

The IF macro worked fine for me. Thanks smile

-- AbhilashaKerkmann - 08 Jul 2020
 

QuestionForm edit

Subject Not sure...
Extension
Version Foswiki 1.1.4
Status Answered
Related Topics
Topic revision: r3 - 08 Jul 2020, AbhilashaKerkmann
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy