Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2020-08-16 08:43:40

etc
Developer
Registered: 2010-11-11
Posts: 3,863
Website

Re: size limitation in forms?

Hi Yiannis,

here is <txp:evaluate /> doc, it works like this:

<txp:evaluate>
	<txp:output_form form='media_<txp:yield name="from" />' />
<txp:else />
	<txp:if_logged_in>
		<p class="error">Error: There is no <b><txp:yield name="from" /></b> host using the <b>from</b> attribute.</p>
	</txp:if_logged_in>
</txp:evaluate>

Offline

#22 2020-08-16 08:53:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

Re: size limitation in forms?

here is <txp:evaluate /> doc, it works like this:

<txp:evaluate>...

Thanks Oleg, It is where I picked mine from, wrongly adapting <txp:evaluate test="linklist"> to <txp:evaluate test='<txp:variable name="check_form" />'>

Your suggestion does indeed work except when the form does not exist, at which time, a txp error is understandably loaded when on debug. So two questions

  1. Do you think that this method will be easier on the parser?
  2. Is there a way to check for the output form quietly so as to supress the back end error and just show the front end one for logged in users?

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#23 2020-08-16 09:07:29

etc
Developer
Registered: 2010-11-11
Posts: 3,863
Website

Re: size limitation in forms?

colak wrote #325381:

  1. Do you think that this method will be easier on the parser?

Certainly, since it will have to parse only the relevant code (thought at a price of one extra db query).

  1. Is there a way to check for the output form quietly so as to supress the back end error and just show the front end one for logged in users?

AFAIK, only by somehow putting the site in ‘live’ mode.

Offline

#24 2020-08-16 09:13:25

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

Re: size limitation in forms?

etc wrote #325382:

Certainly, since it will have to parse only the relevant code (thought at a price of one extra db query).

AFAIK, only by somehow putting the site in ‘live’ mode.

Thanks so much. I think that most will be able to live with both!

Expect a new version for this shortcode soon:)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB