Assistance needed understanding how $SET works

Post

Posted
Rating:
#3976 (In Topic #787)
Joe
Avatar
Standard member
Joe is in the usergroup ‘Honoured member’

...with Fractional Editing

Let's say I have one Comcode page that utilizes Fractional Editing to "quick edit" numerous CPF's (around 15 or so). Let's assume these CPF's all have different edit_types (such as textarea, line, or dropdown).

When I set the edit_type using $SET, will this affect users if multiple users are trying to edit the same or different fields at the same time? My mindset is stuck on the assumption that setting edit_type for one CPF could affect the edit type for other CPFs or even affect other users editing the same field at the same time.

I know that I must change the edit type for EACH CPF I list on this Comcode page (as each one requires a different type), but I'm wondering if this setting is user specific or server specific in the sense that if one user is editing 'Field A' with a textarea edit type, will it affect another user editing 'Field B' with a line edit type?

Also, since I'm changing the edit type so many times on the same page, am I required to "unset" it or anything like that?

I'm a bit confused about exactly how $SET works, so apologies if this post doesn't make any sense. Let me know if so and I'll try to explain myself a little better :thumbs:
Online now: No Back to the top

Post

Posted
Rating:
#4031
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

It's only setting something within the current Tempcode evaluation, nothing is saved, and it's per-request. It setting a little bit of data used later in the FRACTIONAL_EDIT template.

You have to do it because we have no way of automatically determining what input widget goes with what field type, we don't generate/store that anywhere.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,827 members
  • Our newest member is LowfareMart
Back to Top