Jump to content

naruttam

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

naruttam's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. The Processwire version is ProcessWire 2.4.0 © 2015 When attempting to save edits to the page, instead of getting the pw success message, I get the 404 page not found page. This page in question cannot be deleted, moved, edited...nada. Page edit takes me to: http://www.mydomain....e/edit/?id=5772 When I attempt to save the edits the address bar still says: http://www.mydomain....e/edit/?id=5772 but it displays the 404 Page Not Found page and changes are not saved. Also disabled Modsecurity on the server. Any ideas please
  2. Hello adrian, I want radion buttons on the front end, could you help me out with this
  3. Hello Experts, I am trying to make a quiz contest in processwire. This quiz needs to show one question per page. The aim of this quiz is to get more page views. so I created a template, where Quiz questions can be uploaded. After answering one question the user is redirected to the next question or URL on clicking the submit button. I am unable to get the form data. I have the form template and the final page to evaluate the scores. I dont understand where I am going wrong. Here is my code. Please help me out..... quiz.php <?php include("./head.inc"); include("./functions.php"); ?> <div id="content" class="row inside search-page"> <!-- content starts --> <div class="content-border"> <!-- content-border starts --> <div id="body" class="large-8 columns" role="content"> <!-- body starts --> <div class="large-12 columns"> <form id="form1" name="form1" method="post" action="../process-quiz" > <?php $name = 0; $arrlength1 = count($name); echo $arrlength1; for($x=0;$x<$arrlength1;$x++) { echo "<input type='hidden' name='answer[]' value='$name[$x]' />" ; } $p = $page->question; echo "<h1>Q:<span>{$p}</span></h1>"; if($page->quiz_images !=null) { $image = $page->quiz_images->url; echo "<img src='{$image}'>"; } foreach($page->quiz_options as $c) { echo "<input type='radio' name='answer[]' value=\"{$c->quiz_answer_text}\">{$c->quiz_answer_text}<br/>"; } ?> <input type="submit" name="button" id="button" value="Next" /> </form> </div> </div><!-- body ends --> <?php //include("./sidebar.inc"); ?> </div><!-- content-border ends --> </div><!-- content ends --> <?php include("./footer.inc"); ?> process-quiz.php <?php $name = $input->post['answer']; $arrlength=count($name); $myarray = array(); array_push($myarray, $name); $answers =array('one','right'); $score=0; foreach ($myarray as $innerArray) { // Check type if (is_array($innerArray)){ // Scan through inner loop foreach ($innerArray as $value) { //echo $value."<br />"; foreach($answers as $key) { if($value == $key) { $score++; } } } } } $url = "question-".$arrlength; if($arrlength>2) { $url="process-quiz.php"; } $session->redirect("http://www.example.in/temp/quiz-section/$url",false); echo "<h1>you have scored :".$score."</h1>"; echo '<pre>'; // just to check the user inputs. print_r($myarray); echo '</pre>'; }?>
  4. Thank you developers.... I surely will come up with lots of question, please bear with me
  5. Hello developers, I am a newbie to Processwire CMS or CMF. I am stuck in using the TextFormatter module. I need to have pagination for a page, but this page has a header with a 1022*1024 image, so when click on next page, I get the repeated header image. Is there a way to remove the header image on clicking next.
×
×
  • Create New...