42 Posts
Elric
11 years ago
Topic

Hello everybody and thank you for reading,

I'm working on a little project where I have a content type made of two field (the title and and a text, numeric, field), I'm trying to do create a form that from frontend is able to modify one of this field by subtracting the specified amount.

For example:
Title: Zend
Points: 300
input field: 50

that should result in
Title: Zend
Points:250

Now, to have something like that I thought I had to use a custom form template but I immediately realized that something was wrong, I started from the seb_minima template and editing mainbody.php I called my value as echo $cck->get('art_title')->value; or echo $cck->get('art_title')->form; , according to my needs but when submitting my value I had everything "resetted", the title was changed to the date, the other value just empty.

Could someone tell me if Is there a way to do the operation without modifying the template? Maybe using some javascript in the field?
Is there some kind of reference to see how a custom form template is done, anyway?

I'd need some directions, please :)


Have a nice day!


R.


Get a VIP membership
11 years ago
1
Level 1

Hi Romyo,

First hand, i will use Computation Rules ( on SEBLOD view site, number 5 ).

Second hand, i will not modified the template but build a variation or a position override, if need.

Best regards

42 Posts
Elric
11 years ago
0
Level 2

Thank you for your suggestion, Alex, actually the necessity of the application is vanished (the client changed his mind) but I'm trying to build it from scratch by myself just for experience, after finished I'll try with Seblod, thanks again :)

Get a Book for SEBLOD