spreetaucher
Forum Replies Created
-
Hi Boris,
thanks for that brilliantly easy instruction, which helped me to print the username into the form in edit mode. I’m pretty sure that will start some other not so skilled programmers as me to move along as well. ??
However, I want to use the printed value as a conditional value for showing another field in the edit mode, which seems not possible. Am I assuming correctly, that um’s conditional logic generally cannot deal with values that are rendered by shortcode fields?
What I have now is this:
IN VIEW MODE:
– shortcode field that shows user’s products
— conditional logic 1: show IF proprietary “username” field IS the seller’s/profile owner’s username.
— conditional logic 2: show IF “products available user1” IS set to “yes”IN EDIT MODE
– 1 dropdown per seller: “products available user1”, “products available user2″… yes/no visible in edit mode only
— conditional logic for that dropdown to view per seller should be the printed username from the functions.php addition you provided. (So “products available user1” only show if username (from shortcode) equals “user1”)But when I enter that second conditional the dropdown field disappears form the edit mode.
So I guess working with printed values from shortcodes within the conditional fields does not work in general, right?
- This reply was modified 8 years, 5 months ago by spreetaucher.
Thanks Boris. ??
My challenge in this is that I want to use a unique user variable (like username or nickname) to utilize it within a rule in both edit and view mode, that the logged in member shall not be able to edit.For username: it is protected from change by the core so it won’t show up in edit view anyway.
Nickname could work, but to make it visible in edit mode I have to allow the profile owner to actually change its value, what destroys the rule it is linked to.
I read from other threads here that a “read-only” field in edit mode is not possible, right? Cause that would perfectly solve my problem, I think.
Thanks again,
Piet*Update:*
I figured out an alternative way to solve my problem, but it requires one detail that seems to be not possible with UM:
Is it possible to have a non-editable field still visible in profile owner’s edit mode?
If so I could just “display” the username of the logged in user in edit mode and dependent on its value view/hide a manual online/offline dropdown that in turn triggers my individual shortcode module.
I’ve successfully tested this with editable field (nickname), but I do not want profile owners to edit that value, just display it for the further conditional logics.
Any chance?
Thanks.Thanks a lot for your support, Boris.
That helped somehow. I now created that “workaround” extra field for users to manually state that they’re online by doing a profile edit (not my favourite, because it’s an extra step for the profile owner) that triggers the visibility of the shortcode field.
BUT, I found out that the conditional logic are linked with an OR operator, not an AND?
Because I want TWO conditions (username + online status) to mandatorily match for the field to appear/disappear.Am I getting this right that the conditional logic chain for more than one condition is an OR comparison? Is there a way to change that?
That’s what I had in mind, yes.
But unfortunately the value “online” in the last field doesn’t do that.Thanks a lot.
My challenge is of different nature, though (I might have explained this wrong, sorry for that):
I would like to make the visibility not dependent on the visitor’s login status, but on the member’s who’s profile is being viewed.Here’s a screenshot of the shortcode widget and including the conditional field for “Online Status” that comes from the UM extension. (this one is NOT working)
>> https://drive.google.com/open?id=0B4lHxmkiAaVfcVBBa0l1RXg4UVUI’m basically looking for the value that should go into the last field.
Thanks
Thanks, I checked his forum quickly, but since Boris isn’t aware of the “Online Users” extension, I’m not surprised that I couldn’t find a discussion on this.
Back to topic: Any suggestion how to solve my issue or is it impossible?
Thanks a lot.