Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
New tag: if_form_was_called
Not sure that such tag would be very-very useful :)
<txp:if_form_called form="blabla">
<!-- Do something if before this condition form "blabla" was called -->
<txp:else />
</txp:if_form_called>
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: New tag: if_form_was_called
LOL… well, if not even the person submitting a feature idea is sure whether the feature is useful, then there’s really no point in discussing it ;)
Offline
Re: New tag: if_form_was_called
Hi Victor doesn’t this exist already with the override form?
The current system is more user friendly as if an override form is not chosen, the default is used.
Maybe I cannot see the value of your suggestion. Can you give further examples and how your idea might be different to override forms?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: New tag: if_form_was_called
Ok. I developed :) this plugin when read the post about inserting form in the article.
So, the idea is – if i inserted desired form in the article, than i don’t ned one more instanse of this form on my site. If not – insert form somewhere :)
OF course, you can say that this could be done with custom_fields and inserting there some value that says “yes, i’ve inserted the form in article”. But this will work only among articles.
So, never mind :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: New tag: if_form_was_called
¿ chh_if_data ?
Last edited by mrdale (2008-05-30 17:25:00)
Offline
Re: New tag: if_form_was_called
In the next release (i.e. 4.0.7), you could protect a form from being used more than once by this
<txp:if_variable name="gotadsense">
<txp:else />
<txp:variable name="gotadsense" value="yep" />
<script>
//... google code goes here ...
</script>
</txp:if_variable>
You could imitate this behaviour in 4.0.6 with a little bit of PHP.
Offline
Re: New tag: if_form_was_called
Ouch! Nice example! Looks like coockies in textpattern :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline