Jump to content

unique fields?


lsag
 Share

Recommended Posts

Hello. 

I'd like to clarify something that's in the back of my mind for a while. If i have 10 fields with the same parameters, except only the labels, for example scatered in different templates, i must have 10 different copies of those unique fields?

Link to comment
Share on other sites

now we speak about this, if i need to repeat the field in the same page (sender_address and reciever_address), how do i change its name, so i can access it from the template? Maybe with a repeater, but i'll have to use the indexed array, right?

Link to comment
Share on other sites

Also note that while we discuss field/template context, Ryan -the ProcessWire(PW) creator-, has been updating the development version of PW to allow for even more field properties to be set on a per context (template) basis. Up until now this is limited to: field label, description, visibility, column width, and required state.

Read more about this here: http://processwire.com/blog/posts/processwire-2.5.7-core-updates/#field-template-context-now-available-for-any-field-property

Be sure to keep an eye on the blog posts, and/or the ProcessWire Weekly, and/or subscribe to the PW newsletter.

  • Like 1
Link to comment
Share on other sites

now we speak about this, if i need to repeat the field in the same page (sender_address and reciever_address), how do i change its name, so i can access it from the template? Maybe with a repeater, but i'll have to use the indexed array, right?

In this case, because sender_address and reciever_address represent two different things, and you can't have regular fields appear more than once in a page (template), i would just make two fields. To make this easy and fast in the site creation process you can clone a field from when you're editing it. A pic says more than a thousand words:

duplicate.png

When the project at hands needs it and/or you want to have even more options there are also some commercial modules, made by ryan himself, that can make your life even easier: https://processwire.com/api/modules/profields/textareas/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...