9 years ago
9
Topic

Can somebody please tell me how to put cck_id field on the email body when a "submisson" is done on a form?

Get a VIP membership
9 years ago
1
Level 1

Hello jcvieira,

welcome on SEBLOD forum.

In most if field, when you create it in the content type, you have a Help link : "How to setup this field ?" where you can find explaination.

For the email field you have  => "How to setup this field ?"

Regards.

Lionel

9 years ago
0
Level 2

I have tried #cck_id# , $cck->getAttr('cck_id'); but nothing works. The above link was not helpfull.

9 years ago
6
Level 1

Hi jcvieira,

fist thing, starting a post with a hello does not take more time and it's just a matter of courtesy.

Second thing, all the configuration of the email field is described in the link I provided you.

And finally, if you don't provide more informations on what you done, We can't answer you more precisely !

what is cck_id ??

how many and which fields have you in your content type ?

.....

"$cck->getAttr" is just an exemple. You must replace " Attr "  by the attribut (ppropertie) of the Object "field", like :

  • getValue
  • getText
  • getLink
  • getTypo
  • getHtml
  • .....

Regards.

Lionel

9 years ago
5
Level 2

I have a form created with seblod wich contains several combox box and text fields. When the user submits this form an entry is created on the seblod db. This generates an unique id for this wich can be seen if i use cck_id field while listing the entry. Also when the user submits the form i get an email with the form fields but i need this cck_id in the email how can i acomplish this? Thank u

9 years ago
4
Level 3

Hi jcvieira,

You can use this tag [pk] in your email text body.

Regards,
Mehdi.

9 years ago
3
Level 4

ooohhh YES! Thank you... :) Almost perfect... but it seems to give the previous inserted ID how can i add 1 to it? Ive tried to do like [pk+1] but it does not work...

9 years ago
2
Level 5

Hi jcvieira,

Normally [pk] give a primary key of the current created content, not a previous.

Please check again it.

Regards,
Mehdi.

9 years ago
0
Level 6

Hi Mehdi,

I have but it seems that [pk] is not matching cck_id, for instance if i add a new entry on the db [pk] field will say "60" but if i list the entry using cck_id it will say "62". Its not coerant! Sometimes i have to delete entries and i believe that this does not "fill" the gap between them, it should follow database primary key but seems its only counting how many records are on the system and increment it...

9 years ago
0
Level 6

Ok so i got it figured out for anyone interested.

Happens that the "cck_id" field that comes with seblod gets its "primary key" from the core table of seblod and thats why "cck_id" and "pk" have different values. If you want the id from the article itself you need to edit the field under "Storage" => "Parameters" and select "cck_store_form_booking".

Get a VIP membership