Jump to content

Search the Community

Showing results for tags 'Fields'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I have a page field 'make', which consists of manufacturer template pages. A new page can be created from that field, but I currently have that functionality disabled, since following that field is another page field 'model' with a custom selector, 'parent=page.make, template=model'. So since the model field parent is dynamic, new pages cannot be created from the field, as the first requirement for that feature is that a single parent and template be pre-selected... Is there some way I can hook into the options there and add an 'Add New' option at the bottom, opening up the new model in a modal? Thanks.
  2. I need to make these fields for a particular template: Condition={New,Used} and Style={one,two,three}. Is there really no simple way of doing this without making Condition and Style pages with their respective children/options?
  3. $pages->get("/stories/")->find("external_status!=accepted"); This selector works as expected, excluding all the story pages that have "accepted" in the external_status field, but it also excludes stories with no external_status defined (field is empty). How can I make sure those pages are included?
  4. Hello everyone! I just added a new language to an already functioning system, and some fields are not accepting the version in this new langauge. The tab for the language appears "lighter" as seen in the picture, and when text is inputted and "Save" is clicked, it goes back to being empty. Any suggestions??? THANK YOU!!
  5. It struck me today, as I was working on a large site, that it would be really nice if the Setup -> Fields fly-out menu would implement the "Tags" feature to group fields into sub-menus. I use Tags (defined under the 'Advanced' tab when editing a field) to neatly organize fields on the actual Setup->Fields page. It would be great if the menu was also organized the same way. A single fly-out menu of 50+ un-grouped fields isn't so useful... What do you think?
  6. Hi, Can someone please help me with the scenario below, I am trying to build a Project portfolio sort of a site. I have a homepage which displays three recent items from a Repeater field named my_items (3 RepeaterReady fields are created for the home page and filled with data), example code below: <?php foreach ($page->my_items as $item) { ?> // display item values, for example: <div class="item"> <img src="<?php echo $item->my_image->url; ?>" /> <a href="<?php echo $item->my_link->name; ?>">View</a> </div> <?php }; ?> I have a page called my-items with repeater 'my_items' field for displaying the same as above. The page 'my-items' has children, each of which have 'my_items' Repeater field for displaying data respective to that page using the same code as above. The page/ site hierarchy is like: Home - uses Repeater 'my_items' |- My Items - uses Repeater 'my_items' |- Item 1 - uses Repeater 'my_items' |- Item 2 - uses Repeater 'my_items' |- Item 3 - uses Repeater 'my_items' |- ... |- My Items 2 |- Item 1 - uses Repeater 'my_items' |- Item 2 - uses Repeater 'my_items' |- Item 3 - uses Repeater 'my_items' |- ... and so on. What I am doing as a starter with PW is: - Entering same data for in Repeater for Home for some item, lets call this 'A'. - Entering the same for My Items the data for 'A' - Entering the same for Item 1 the data for 'A' Therefore, I am adding 'A' thrice in three places, violating the DRY principle. What I have tried and failed is: - To get 'A' to display in My Items page fetched from Item 1 and then, - the Home to display 'A' fetched from My Items so that I only enter data for 'A' in Item 1 and not in every page that displays it. Caveats: - The homepage displays 3 recent only from page My Items - Page My Items displays one from each children - Item 1 has multiple Repeater blocks/ pages for displaying data (e.g. My Item #1, My Item #2, My Item #3 .......... My Item #n) Another way I think to explain it would be a photography site with structure as: Home - display 3 recent photo projects |- Projects - displays each child project with the 1st photo and its description |- Nature - Has many photos with description |- Animals - Has many photos with description |- People - Has many photos with description I hope I had explained properly. Any help or suggestion would be highly appreciated.
  7. Currently to change the 'summary' description in context of 'basic-page' we would have to do this: // get the template $t = $templates->get('basic-page'); // get the field in context of this template $f = $t->fieldgroup->getField('summary', $useFieldgroupContext = true); // value of the field $f->description = "'basic-page' summary description"; // save new setting in context $fields->saveFieldgroupContext($f, $t->fieldgroup); What I'd like is something like this // get the field $f = $fields->get('summary'); // value of the field $f->set('description', "'basic-page' summary description", $context = 'basic-page'); // save new setting, perhaps optional, because behind // the scenes `saveFieldgroupContext` has been called already? $f->save(); Similar for getting in context: $f->get('description', $context = 'basic-page'); Not only is it more intuitive, but less verbose, in my opinion. What do you think?
  8. 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?
  9. I have a checkbox field that I need to split into two checkboxes. Currently, the single checkbox determines whether a badge appears next to an entry on the front end, but now that badge should only appear if both checkboxes are checked. So when I add the second checkbox, I'll need all the old pages that were created when there was only one checkbox to now have both checkboxes checked so that the badge appears based on the new template logic. Any suggestions that would be more efficient than manually going through and editing all the old pages by hand?
  10. Hi Guys, In 2.5 we can export the fields. I am wondering whether there is a way that it can handle importing the json from the modules when installing. Eg : A module is created which uses certain fields. I have exported the fields via export and keeping it at some fields.json . Does PW have the ability to find the fields.json and import the fields . This is just a question to know whether something like this have been added into core. Thank you
  11. I have 12 fields set to 33% width and although 3 of them are the correct size, nothing will sit to their right (in the 2nd and 3rd column). This happens to the first field on every second row of fields. Checked the database value for the fields and they're definitely 33%. The wierd thing is, if I set it to 10, 20 or 30%, they behave in the same way. Wierd glitch or known bug? Or maybe my maths is crap :-/
  12. I'm just getting started and have looked for ways to update a page including its fields via a front-end form, but I'm missing a few pieces of the puzzle. Here's what I have, mostly borrowed from posts on this forum: $page = $pages->get('1015'); // get some page // make a form $form = $modules->get('InputfieldForm'); $form->method = 'post'; $form->action = './'; // add the page's fields to the form $form->add($page->getInputfields()); // add a submit button to the form $submit = $modules->get('InputfieldSubmit'); $submit->name = 'submit'; $form->add($submit); // process the form if it was submitted if($input->post->submit) { $form->processInput($input->post); $page->save(); echo '<p>saved</p>'; } // render the form output echo $form->render(); I think the problem is that I have to loop through the form inputs and save them individually? How would I do this?
  13. As part of the Agile user story system that I'm in the process of building, each story has a list of acceptance tests that go with it. I have this list put together with a repeater, and I've added a checkbox to each test so that developers can mark it off as complete. What I really want to do, however, is not require developers to edit the page to check things off. They aren't writing the stories, only reading them, so I really want to find a way to give them a checkbox on the rendered page itself that can update the state of the checkbox field when they click it. The users viewing the page are already logged in (I'm using Adrian's Protected Mode module to lock down the whole site), so It seems like then first step will be to find the right Process API call to save a change to the page. The second step is probably harder, though, making all this happen from Javascript.
  14. I'm trying to use a repeater field within a repeater field and the secondary/internal repeater field does not show up in the Add Field drop down within its parent repeater field Edit > Details page. Looks like it's not built to be nested? Thanks in advance! P.S. I'm very new PW and love it! All other CMS stuff I do is with WordPress and MODX.
  15. I was looking for a way to group fields within the admin today and came across this wiki entry which does just that http://wiki.processwire.com/index.php/Template_Tabs IE have fields nested under certain categories when editing a page such as General Content (heading/category) Summary (nested field) Body (nested field) Featured Content (heading/category) Homepage images (nested field) Homepage summary (nested field) I was wondering if there were plans to make this a little more straightforward and perhaps use Categories or Tags. We already use Tags to group fields on the main fields (admin >setup >fields) and could this be extended slightly?
  16. Edit: durr... I forgot fieldset tabs! http://processwire.com/talk/topic/1592-problem-with-fieldset/ Feel free to delete this post / thread altogether... ===================================================================== Is there a method or module to group a certain number of input fields in a template (backend, edit mode)? I have basically two input field categories - product features and product description. Both categories have 1-2 dozen input fields. Together with all the other fields, it can get messy in the backend, even if I reduce the input field width to 25%. Is there a way to a) move a bunch of input fields to dedicated tabs? or b) include those in a collapsible group that are closed by default? I thought that field groups were the tool to use for this, but I'm not sure if or how.
  17. Hello, I always put some kind of prefix to fields like some user fields usrFirstName usrLastName but I would like to name them more like firstName lastName so when using a page like this $user = $pages->get('/users/clsource'); I can do this $user->firstName and not this (more ugly way) $user->usrFirstName Yes I know this is already possible, but when you handle a lot of fields, some fields collide with the same name but with different output and format. Is there a way to make a namespace or something, so using prefixes is no longer necessary? In PW you can organize fields inside categories, could be that I can have multiple fields with the same name, but whitin different categories. and see them sorted inside the template field selector by categories? Thanks!.
  18. I'm working on a site with an about-the-team page where we have a sub-page for each different area of specialty. Each one of these pages will have a list of people who are in that specialty, this list built by pulling 'person' pages that were assigned to that specialty page through a page field. With me so far? Here's the fun part. I want to add a "level" to each of the people that show up on a specialty page. So let's say I'm on the Widget Managers specialty page, and I have the 'people' page field set to pull Alice and Bob to appear listed on this page. But I want Alice to be a 'senior' widget manager and Bob to be a 'junior' widget manager. I could just put a field in the Person page type that lets me set that person's level, but wait! A person can be assigned to more than one specialty page, with different levels on each one! So Alice might be a senior widget manager and a junior doohickey wrangler. She has to show up on the widget managers page as senior, and on the doohickey wranglers page as junior. Ideally, I'd have a repeater field containing two page fields, one to select a person and one to select their level on the current specialty page, but repeaters can't contain page fields. Anyone know of a way I might approach this?
  19. I was following the examples given in Diogo's answer here - However, I am either making a mistake or not getting it. $products = $pages->find("parent=/products/"); foreach ($products as $product) { //Database queries and while loops to give me the width, depth, height and seat_height variable values. They echo out fine. echo "<p><strong>The next dims are: " . $width . ", " . $depth . ", " . $height . (isset($sh)?", " . $sh:"") . "</strong></p><br />"; $product->of(false); $product->width = $width; $product->depth = $depth; $product->height = $height; if(isset($sh)){ $product->seat_height; } $product->save; //print_r($product); if(isset($sh)){ unset($sh); } } The script completed without errors, but nothing appeared in the forms for the individual product pages in admin. However, the values do appear in the array if I print out the $product array, for example: Array ( [title] => 111 Spindle Side Chair => 111 [width] => 490 [depth] => 530 [height] => 830 [seat_height] => 465 ) Bit confused. Any help appreciated.
  20. I need to have a time field, for a recurring class start and end; i can't do it with the built in date/time field because i don't need the date... i was wondering if anyone had already come up with a way to implement a time value without date.. something like this? https://drupal.org/project/timefield i previously implemented a time picker on a formbuilder form which allowed you to pick time only; maybe i'll need to build a module to put the time selector in a text field on my form... maybe something like this http://jonthornton.github.io/jquery-timepicker/
  21. Is there a way to set a default value in the editing interface for a Field? For instance, for a Text, Integer or Page field used in a Template. For example, lets say I have a template called Songs with the field Length. Length has default value 3:00 (minutes). When I create a new Song Page, the Length field should appear pre-populated in the editing interface with the "3:00" default value.
  22. Hello. I'm starting a new project on Processwire 2.4. I'm experiencing some funky behavior, as follows: 1. I add a new custom field and save it. 2. Try to edit the field, and the "description" attribute is grayed out, and I can't add a description. I'm experiencing it with all field types. Has anyone else experienced this? I did some futzing around with the admin theme, trying to use the new "themes as modules" method, and I'm wondering if I screwed something up or if it is an actual bug in 2.4 A screenshot is below. This is after saving the field, and opening it up to edit. Thanks for any help, Will
  23. Hello, I am starting to build a project for a client that wants a customer portal. I have begun playing around with the FrontEndUserProfile module and all is working. My question is essentially wrapping my head around exactly how to setup my "tables/fields" so that I can have a many to one relationship. (most of my experience is with MSSQL and asp.net) Basically I need to create a table that holds donation amounts for users. Each user can have multiple donation amounts. And I want to be able to call "Select * donations where $user->id == $donationId orderby dateAsc" (I know that this context is off but I hope you get the idea) I am still wrapping my head around exactly how PW makes these api calls and how the fieldtypes work, and I am probably making this harder than it has to be because it seems that PW has an easy answer for nearly everything. Can someone point me in the right direction on how best to accomplish this with PWire? Thanks!
  24. Hey Guys, So I'm creating a search template that will search all of my created fields for a query. Unfortunately, when I go to add 1 or 2 more from the stock search template as a test, I still am only searching the title, body and sidebar and not what I added. Any guidance on this? I have added the pipe line divider to add more fields manually to test the functionality behind the search template but no luck. Perhaps I am missing something? Here is a sample of what I am attempting, the piece of code I have included does not include everything in its entirety just the piece I am altering as a test. $matches = $pages->find("title|body|sidebar|band_title~=$q, limit=50"); As you can see I want to also search the field band_title but I have no results coming through. Last, is it possible to add search all fields? Versus inputing every field manually? Thanks for the help!
  25. I looked through field settings, but it doesn't seem to be possible to make a field hidden/disabled on a permissions or superuser basis. For example, if there were fields in a template type that are too complex or "dangerous" to allow editing by a normal user, but should appear for an admin user to edit. Right now, if I set a field to be hidden, it hides it from all users, even the superuser. Anyone ever have the need to get around this? Worse comes to worse, I'll code a simple admin-only page with autogenerated form fields that will allow the admin to edit the specific fields while they stay disabled within the normal pwire UI. Thanks for any suggestions!
×
×
  • Create New...