215 Posts
cubist
9 years ago
2
Topic

Hey Fellow Sebloders

I am wondering about custom attributes. Can anyone provide a documentation link?

And how would I add a custom attribute of a field in my template? 

I am used to using code per below... what's the extra step to get the custom attribute of any field?

$cck->get('trf_clinic_name')->value

Also ...

How would I set a Conditional State for field A based on the customer attribute of field B?

Thx!

PS I've also noticed that the entries I made into custom attributes when setting up the field don't seem to stick ( after saving and returning, tho they remain in the dB field called "options2" ). Anyone tried using this field?

Get a Book for SEBLOD
4229 Posts
Kadministrator
9 years ago
1
Level 1

Custom attributes add attributes like required="true" to the html of the form element, sometimes this are needed for javascripts to work

215 Posts
cubist
9 years ago
0
Level 2

I have a situation where an email is triggered to a different office depending on the country chosen. In this case, it's mostly western hemisphere and european office. Thus I really only need an ON or OFF attribute.

Can someone offer the best way to trigger an email based on the country chosen ... WITHOUT setting up a very long conditional for the field? Thx!

Get a Book for SEBLOD