Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cehlo's Achievements

Jr. Member

Jr. Member (3/6)



  1. Ok, so according to your previous post variable $pizza->ingredient is page array so you must use foreach also for ingredients.
  2. If you are getting ID of ingredient possible workaround could be this: $ingredient = $pages->get($pizza->ingredient); Then use $ingredient as page, eg. $ingredient->title... Maybe check settings of your field in Pw if nothing is out of ordinary.
  3. Now it is a lot clearer. Yes you are right in both points. Either way from your first post it was not certain. Regarding variables you are right, but in your first post your first php input was using variables without giving them value. So $percent = $goalNum / $raisedNum; will give you everytime 0, becasue variables $goalNum and $raisedNum are empty. But I can see from your next post that you are giving them values so it was just misunderstanding. If count is another variable it is also without problems from your full code, consider my first post as irrelevant then. i Ok and what about your fields? Are they Integer or Text fields? Can you change them and avoid typecasting at all?
  4. Hello Spercy16, Firstly I don't think it is good practice (or possibility at all) to use dollar sign in fields name - raisedAmount$count - really bad practice to my opinion. Continue using camelCase style or add underscore - raisedAmountCount or raisedAmount_count. First error: In your first example - you are calling variables $goalNum and $raiseNum without declaring them at all. That is why these variables are empty. Second problem: raisedAmount$count and goalAmount$count are fields or pages? Get rid of dollar sign in field name and use direct aproach for calling fields in this scenario. $page->raisedAmountCount etc. (page->get documentation). Also do not typecast these variables in your code. If this field should contain only integer values than change field type in processwire to Integer. Really your main problem are fields you are calling raisedAmount$count. Is this the field name? Or is it child page with another field $count? Maybe give us more information about your field and page structure to tell you right way to call these fields. <? php $raised = $page->raisedAmountCount; //if these fields are integer type $goal = $page->goalAmountCount; $percent = $goal / $raised; // You will change this, because you are calling not existing vars ?> <progress value="<?php echo $percent; ?>" max="100"></progress> <!-- This should be working without any problems -->
  5. Hmm, maybe try to explain better. Formbuilder is not used for creating pages, it is used for creating forms and saving input in meaningful manner to PW. You can just insert created form with formbuilder to any template on frontend, it is not connected to creating pages and templates as far as I know.
  6. Hi there, first the answer depends on that if your array "children" is PageArray. If yes I believe if you want currently viewed page you must check if child->id is simalar like page->id not parent->id. Secondly if you want to check if checkbox is checked the right way will be: $child->checkbox_field == 1 Also I think you know this but else if must be put before else statement :D. Lastly maybe consider using custom menu builder for this. Menu Builder. In addition this checking can be done before building actual markup for menu. So you can consider this solution an then you won't need else if. $menuPages = $pages->find('menu_item=1'); //and add additional selectors for template etc., also you can use selector like this for method children() Cheers.
  7. It is very strange, when I used bardump in tracy console during this error with same line: bd($this->user->language->isDefault()) no error in tracy. I am just rubbing my head on this for like 4 hours and can't find no error or the cause of this. I even try fresh install of pw, imported database and site folder with no help. Then deleted ready file, all modules files still problem persists... Adding also some more error description from debugModelPanel. Thanks for help in advance.
  8. Maybe little bit old, but again same error. Now I can't save or edit user profile for another user than superuser. I am not currently changing by any means edit profile module nor hooking it. And this is popping out. Maybe at least some advice how to track error more precisely, because now is only forwarding me to LoaderCache and there is no problem. Thank you very much.
  9. Hi there, If I understand correctly you don't want to have selected none page? If that is the case, just drop down pages for select, find that one which is selected and choose "unselect".
  10. Hi guys, I am just thinking about purchasing Form Builder. First, I want to ask if it is possible to generate forms also on backend custom pages, because in description of module is written only about generation forms in frontend? You would ask why would I want to use forms in backend. There are some events, which I want to create online registration for - different for members - they will log in and It will automatically load information from their accounts to forms, on the other hand there will be different form for users which do not have accounts on frontend. Thank you for your assistance. Cheers Cehlo
  11. Hi guys, just one shor question maybe just for my insight. When we are using PageArray like array of pages, it is possible to have same page in there twice? Specific problem - I had created method to generate pedigree of dog with 30 ancestors. It is PageArray and order of pages / dogs is important here to generate fronted output. So, You know dogs are not very monogamic and inside one pedigree it is possible that one male ancestor is there multiple times. So problem is that during generation of this PageArray, when there is second occurence of same page / ancestor, first will disapper. So my question is - is not possible to have same page multiple times in Page Array or should I look for some errors in my code (which I did not find for now) ? <?php // It is not same code, but this is all according to manipulation with pageArray I am using when I am creating PageArray $pedigree = new PageArray(); $pedigree->add($ancestor_page); ?> Thank you for your answers. Cheers B.
  12. Hi there, I do not know where the problem is, but the notice is not showing when users are logout. It is showing only when logged in as superuser (on frontend, or module configuration page). Any Ideas what could be the problem? Also I tried to reinstall module, refrech cache, clear local storage. Still I tried it on various devices, cookie notice is nowhere to be found. Thank you very much.
  13. Hi folks, do you have some ideas to my problem? I can´t really find the solution. When I am editing any page with different role than admin the top processwire menu disappears. Only happens while editing. See photo. Thank you very much for any help. Cheers.
  • Create New...