Share » Forums » Developer » Affect a value to a field without form

Affect a value to a field without form

Affect a value to a field without form

Friday 25 January 2008 12:29:01 am - 4 replies

Author Message

Felix Laate

Friday 25 January 2008 5:08:23 am

Hi!

Not sure if this is what you need. But with javascript you could:


<script>
document.getElementById('mytitle').innerHTML = 'test';
</script>

<span id="mytitle">{$node.data_map.title.value}</span>

Cheers!

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Anthony M.

Friday 25 January 2008 6:52:25 am

it's not that... i want to insert in the database, to fill in the field of the node automatically, do you understand ?

Anthony

Atle Pedersen

Friday 25 January 2008 9:10:10 am

Unfortunately eZ has no mechanism that allow you do do such a thing. You cannot manipulate the database from inside a template.

What you maybe could do is creating a javascript doing a post call to content/action with the desired data.

Piotrek Karaƛ

Saturday 26 January 2008 2:11:20 am

Hello everyone,

It is possible by means of creating your own PHP/SQL interface for such changes (or maybe even using eZ API), but it is not considered a normal routine as far as I know, since you will be ignoring/braking versionning abstract layer. You have to understand what you're doing and how data is stored in the attributes' db table. I have used that approach in several cases, for example for flagging or periodic shuffling purposes.

Good luck,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu