Dynamically Changing the Edit Site View Field Values #1192
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#1192
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
Open Admin View as an edit Site View.
Expected result
I went thru the below wiki items and many other topics during the last two weeks.
Field Types
Basic Fields
Admin Views
Advanced Fields
dynamicGet
How to overwrite the custom fields
Setup Site Edit View in JCB
"Setup Site Edit View in JCB" was able to direct me
on how to give the users the ability to add their own record without having access to the administrator view from the admin.
Here is where I am stuck with:
When the site view open on edit mode, the value are the set values in the fields that where setup.
Example: on the enclosed screenshot "roomid" shows value 1 since that is the default. I have a variable named "$newroomid" which value is 831765236I would like to dynamically replace the 1 for 831765236. The way arrive to the new number is that the first 3 digits, 831 is the generic user current user id. The rest, 765236 is a random calculated number with the PHP function mt_rand(100000,1000000). The two are combined to get 831765236. This allows me to have a unique "roomid" since the first 3 digits will prevent me from the random be duplicated and assigned to another user.
In short, I want to override dynamically the values on the edit view as it opens. Is there a way to do this in the JCB function or from your experience is there another short and simple way to do it?
The fields that I would like to dynamically override are:
a.roomid AS roomid
a.roomname AS roomname
a.moderatorid AS moderatorid
a.moderatorpass AS moderatorpass
a.meetdate AS meetdate
a.meettype AS meettype
a.meetstatus AS meetstatus
a.meetlength AS meetlength
a.maxparticipants AS maxparticipants
Actual result
Once the edit Site View opens it shows the default fields values from the Admin View.
System information (as much as possible)
Additional comments
The JCB wiki is great and has a lot of information. JCB has excellent features that I this point I am not
ready to use. I am focusing on basic component building. I was able to rewrite my first Joomla 3.10 component into
my Joomla 5.2 without ever done a Joomla Component before. I am converting my second Joomla 3.10 from also from scratch.