neosin
Members-
Posts
107 -
Joined
-
Last visited
Profile Information
-
Location
Canada
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
neosin's Achievements
Sr. Member (5/6)
36
Reputation
-
@fbg13 that makes complete sense, thank you for this
-
now I just have to figure out how to access those video template repeater fields through the API
-
@fbg13 it works! thank you so much, the repeater is what I needed. I am still learning how the PW and the different fields work thanks again
-
@fbg13 thank you for this, I will investigate repeater fields (I haven't tried them yet) thank you!
-
@fbg13 thank you, Sorry I don't quite grasp this explanation since the people page only uses "title". Are you saying I need yet another template and fields to merge the "people" and "roles" for each video? The people and roles are "predefined" and exist already Here is my current setup: Template name: videos field: title field: body field: people type: asmselect Template name: people field: title Template name: roles field: title ideally this is what an editor would see when editing a videos template record field "people": [drop down list of names] [drop down list of roles] [button "ADD"] example usage for new video page record: title: Example Video body: Video description people: [ "Bob Smith" ] [ "Producer" ] [ "John Doe" ] [ "Director" ] [ "Bob Smith" ] [ "Catering" ] [ "Bob Smith" ] [ "Sound Editor" ]
-
I have a template that allows multiple "people" records to be attached (basically tags) however each of those "people" can also have multiple "role's" selected from a drop down. is it possible for tags to have tags and if so how can it be accomplished? For example a "video" data page where the content editor can add multiple people names (via select list) and the roles of each person (via select list) I am probably over complicating this in my head again regarding how to do it in PW, any help de-muddling this in my mind would be much appreciated I have the add multiple names working using asmselect but am not sure how to add the select role option dynamically to each name once added. I am thinking there should be a table with 2 columns where the first column is the user name and the second column is the role and when you insert new record it adds a new row allowing to select a single name and role for the new insert. The "people names" and the "roles" come from different templates since people can have different roles in different videos thank you
-
@adrian thank you, figures it was in the forum and not the modules section I needed to search lol
-
@adrian do you have a link for this module? I searched " Settings Factory " in the modules section and it returned zero results. I am curious to check it out thank you
-
Admin Navigation in UIKIT Admin Theme not translated
neosin replied to Maddogi's topic in Multi-Language Support
Hi Michael are you using the default "multilanguage installation profile" ? I believe this profile comes with English, German, Finnish languages when you install it. -
Do you need to sanitize radio buttons or checkboxes when using POST?
neosin replied to SamC's topic in General Support
@SamC Best practice is to sanitize everything a user sends to server, never trust users. It is easy to hack forms using just your browser "developer tools" it lets you change values of everything including all form values. Using your example colors values, the values could be changed to do multiple things from "using unsuported other values" to injecting SQL or PHP code for whatever nefarious purpose. The only time you can relax is if you have predefined values and match those values to what is sent to the server. For example in your case, on form submit you could compare the gridRadios array to a PHP array of values to see if there is any match, if so then data is valid and proceed otherwise reject submission as invalid. but 99.9% of the time it's best to just sanizite user input -
profields page table "count()" error when editing field
neosin replied to neosin's topic in General Support
@BitPoet ty, wasn't sure where to post -
I see this frequently when editing existing PageTable fields within a template (in modal) and also directly in setup>fields>pagefield_name this function seems to be the culprit /** * Get the Inputfield used for input by PageTable * * @param Page $page * @param Field $field * @return Inputfield * */ public function getInputfield(Page $page, Field $field) { $inputfield = $this->modules->get('InputfieldPageTable'); $value = $page->getUnformatted($field->name); $inputfield->attr('value', $value); $templateID = $field->template_id; if(!$field->parent_id && !empty($templateID) && $page->numChildren > count($value)) { $orphans = $this->findOrphans($page, $field); if(count($orphans)) $inputfield->setOrphans($orphans); } return $inputfield; }
-
how to create non editable field to show page ID in admin form?
neosin replied to neosin's topic in Getting Started
@adrian tyvm if anyone needs example of insert custom field before other form fields: wire()->addHookAfter('ProcessPageEdit::buildForm', function($event) { $pp = wire('pages')->get(wire('input')->get->id); $form = $event->return; $field = wire('modules')->get("InputfieldMarkup"); $field->label = 'TEST'; $field->value = $pp; $field2 = $form->get('title'); // Field to find and insert new field "before" it $form->insertBefore($field,$field2); }); -
how to create non editable field to show page ID in admin form?
neosin replied to neosin's topic in Getting Started
@adrian thank you, I will use this runtime markup fieldtype On a side note, using hooks how would you put a non editable field at the top of a form? this is what I had come up with before seeing your reply above, the results are it gets added but under the save button. For learning purposes, how would I make it added at the top of the existing form fields (if it is even possible)? wire()->addHookAfter('ProcessPageEdit::buildForm', function($event) { $pp = wire('pages')->get(wire('input')->get->id); $form = $event->return; $field = wire('modules')->get("InputfieldMarkup"); $field->label = 'TEST'; $field->value = $pp; $form->append($field); }); -
how to create non editable field to show page ID in admin form?
neosin replied to neosin's topic in Getting Started
ok this can be deleted, looking at @adrian's redirect module, it seems I need to create a hook in admin.php and then add the field to the form. Sorry, still trying to muddle my way through PW lol