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 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 :-/
  2. 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?
  3. 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.
  4. I'm in the process of building an internal tool using ProcessWire for my team to write and manage Agile user stories. (It actually started out as a quick prototype, but you know how things go with ProcessWire, I kept going for a few hours and suddenly had a pretty full-featured system. ) The way we do user stories, we have a story ID, such as "OP100", and then a title, such as "As an admin, I want to upload a PDF to attach to a user's account." I have these as separate fields, with the latter being the actual page title. These titles can get somewhat long, however, and can change throughout the lifecycle of a user story, breaking links from Pivotal Tracker. Ideally, I'd like to just use the story ID as the name / URL, so instead of "/as-an-admin-i-want-to-upload-a-pdf-to-attach-to-a-users-account/", the page would just be "/op100/". Further complicating this is that the story ID is optional (since a story can start out as just a concept that turns into an actual story later). So my ideal workflow would actually be one where the title creates the URL initially, but once there is a story ID, the URL changes to that (or even better, aliases to that). One more related thing I'm hoping to do is to concatenate the story ID and title in the admin. Any ideas on how to do this?
  5. 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?
  6. 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!.
  7. 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.
  8. I'm not sure how to even phrase this question, I think I need to learn more specific vocabulary to even ask it. But here goes: With a Processwire site, how does one deal with synchronizing data between a local development database and a live production database? Specifically, the following scenario. Let's say I'm developing a site for a small business client: I develop the site locally, and eventually deploy it to a server The client starts using the CMS, and entering data which is saved in the production database The client requests a new feature -- let's say it requires adding a few fields to an existing template I add the fields to the template on my local development machine Now how do I get those changes to the live site, without overwriting the data the client has already entered? The way I am currently handling this is as follows: I ask the client to stay out of the admin area and stop making changes I dump the production database, and import it to the local dev database I make the changes to the fields / templates I dump the dev database, and import it to the production database Is there a better, more efficient way? Are there specific database tables that define the "idea" of fields and templates, but not their content? In the Rails world, this sort of task would be a "rake db:migrate". One solution, I guess, would just be to connect my local dev site to the live production database once a site is live. But I prefer to be able to work offline if needed, and sometimes I'm dealing with shared hosting services that have limited or unreliable external database access. Forgive me if this is covered elsewhere, or already has a well-documented and obvious solution. I would love to hear any thoughts or suggestions.
  9. 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.
  10. 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
  11. 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?
  12. 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!
  13. 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!
  14. 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!
  15. 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/
  16. Instead of creating a field one by one, is there any way to create multiples at the same time? For instance, if I wanted 3 text fields, it would be so awesome if I could type 3 comma separated names, labels and descriptions thus reducing time and increasing efficiency. I would love this feature!
  17. Hello, Is there a way to group together fields, like in a repeater field, but only allow there to be one set per template? I looked into the fieldtab field but this doesn't allow for certain features that a repeater would - ie, allow the same field to be used at least twice within a page (eg, outside a repeater and within a repeater), and to add a group of fields into a template as one chunk. This would seem like a handy feature feature and I'm probably missing something! Many thanks in advance, ben
  18. Good day, gentlemen, I apologize if the answer to my question exists already, I just couldn't find it. I'm working to have a group of global data such as tagline and contact info. I defined a hidden page ("sys") to store in its fields all the required data. Then the template (actually a prepended script) retrieves and attaches them to $page, like this: $sys = wire('pages')->get(1222); $page->tagline = $sys->headline; $page->contact_name = $sys->contact_name; $page->company_name = $sys->company_name; $page->company_address = $sys->company_address; $page->city = $sys->city; $page->country = $sys->country; $page->tel = $sys->tel; $page->email = $sys->email; $page->tel = $sys->tel; However, I was surprized to see that using the "$page->get('selector')" is 3 times faster than "$page->selector" (even if we're talking about 30msec vs 90msec on localhost): $sys = wire('pages')->get(1222); $page->tagline = $sys->get('headline'); $page->contact_name = $sys->get('contact_name'); $page->company_name = $sys->get('company_name'); $page->company_address = $sys->get('company_address'); $page->city = $sys->get('city'); $page->country = $sys->get('country'); $page->tel = $sys->get('tel'); $page->email = $sys->get('email'); $page->tel = $sys->get('tel'); Wrong conclusion. I think I just witnessed the cache at work. They actually have the same speed. I also thought of hard-coding them in /site/config.php. I know, not very clean and requires further work for multilingual data, but it seems it will be faster. Another one would be a custom query to select all the data in one pass. Which way would be the cleaner/faster/powerwirish one? Thank you.
  19. Hi! This is my first posting at this forum and I am on my first PW website. The CMS looks pretty cool and I like its approach of handling data. Well, there is just one thing I don't understand or perhaps that way is new to me. The assets management. My website (about 100 pages) has a slider with 3 images in its header. As I understand I have to attach an image always to a particular page. If I want to use the same image on another page, I have to upload it again. Right? I can't access it from a field on another page (beside access via TinyMCE). Thanks for help! Sebastian
  20. 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.
  21. I am using a PW installation as a template for every future PW installation. So within that I create all kinds of fields and templates for many different use cases which might not be used later in a copy installation so I delete all unused. What would be a good way to delete them fast instead of clicking every single template and field and delete it in the delete tab?
  22. Having difficulty finding this question previously asked, but here goes: I'm following Macrura's tutorial for creating custom menus (where the menus aren't a reflection of the site's page hierarchy). As a first step, I've created a page called Menus with children that use a template with a Pages field type. This is set to use PageListSelect as the input type, which lets me pick a specific page in the hierarchy from any parent tree. Is it possible to exclude certain pages from being selectable in the tree? It notes that I can't use PageListSelect and restrict by page template, so how else might I go about it? These pages are already set to be "Hidden: Excluded from lists and searches" so I'm not sure why they still appear in the list of selectable pages?
  23. I've tried searching the forum in case this was already asked, so sorry if I'm duplicating questions here: I want to pick a page from a dropdown so I can associate it with a content type. I created a "Page" type field, but it populates only top-level parents in the dropdown. How would you go about listing all pages and their children instead?
  24. I have a Concat field whose name i just tried to change was: query_pages attempted: query_subpages After the failure shown below, the prior name still exists, and no reference to the new name I attempted. Result: ProcessField: Saved Field - query_subpages TemplateFile: Can't find file: '.\pwire\field_query_pages.frm' (errno: 2 - No such file or directory) RENAME TABLE `field_query_pages` TO `tmp_field_query_subpages` #0 C:\dev\xampp\htdocs\pwire\wire\core\Fields.php(187): Database->query('RENAME TABLE `f...')#1 [internal function]: Fields->___save(Object(Field))#2 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(271): call_user_func_array(Array, Array)#3 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('save', Array)#4 C:\dev\xampp\htdocs\pwire\wire\core\Field.php(231): Wire->__call('save', Array)#5 C:\dev\xampp\htdocs\pwire\wire\core\Field.php(231): Fields->save(Object(Field))#6 C:\dev\xampp\htdocs\pwire\wire\modules\Process\ProcessField\ProcessField.module(741): Field->save()#7 [internal function]: ProcessField->___executeSave()#8 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(271): call_user_func_array(Array, Array)#9 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('executeSave', Array)#10 C:\dev\xampp\htdocs\pwire\wire\core\ProcessController.php(194): Wire->__call('executeSave', Array)#11 C:\dev\xampp\htdocs\pwire\wire\core\ProcessController.php(194): ProcessField->executeSave()#12 [internal function]: ProcessController->___execute()#13 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(271): call_user_func_array(Array, Array)#14 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('execute', Array)#15 C:\dev\xampp\htdocs\pwire\wire\core\admin.php(45): Wire->__call('execute', Array)#16 C:\dev\xampp\htdocs\pwire\wire\core\admin.php(45): ProcessController->execute()#17 C:\dev\xampp\htdocs\pwire\wire\templates-admin\controller.php(13): require('C:\dev\xampp\ht...')#18 C:\dev\xampp\htdocs\pwire\site\templates\admin.php(13): require('C:\dev\xampp\ht...')#19 C:\dev\xampp\htdocs\pwire\wire\core\TemplateFile.php(125): require('C:\dev\xampp\ht...')#20 [internal function]: TemplateFile->___render()#21 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(271): call_user_func_array(Array, Array)#22 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('render', Array)#23 C:\dev\xampp\htdocs\pwire\wire\modules\PageRender.module(250): Wire->__call('render', Array)#24 C:\dev\xampp\htdocs\pwire\wire\modules\PageRender.module(250): TemplateFile->render()#25 [internal function]: PageRender->___renderPage(Object(HookEvent))#26 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(271): call_user_func_array(Array, Array)#27 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('renderPage', Array)#28 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(293): Wire->__call('renderPage', Array)#29 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(293): PageRender->renderPage(Object(HookEvent))#30 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('render', Array)#31 C:\dev\xampp\htdocs\pwire\wire\modules\Process\ProcessPageView.module(97): Wire->__call('render', Array)#32 C:\dev\xampp\htdocs\pwire\wire\modules\Process\ProcessPageView.module(97): Page->render()#33 [internal function]: ProcessPageView->___execute()#34 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(271): call_user_func_array(Array, Array)#35 C:\dev\xampp\htdocs\pwire\wire\core\Wire.php(229): Wire->runHooks('execute', Array)#36 C:\dev\xampp\htdocs\pwire\index.php(192): Wire->__call('execute', Array)#37 C:\dev\xampp\htdocs\pwire\index.php(192): ProcessPageView->execute()#38 {main}
  25. 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.
×
×
  • Create New...