Posts

Showing posts with the label forms

Form not submitting values

Image
Form not submitting values Ok so, I am a self taught coder, so no need to be overly rude if I am missing something lol. This is the first ever form I have created, and I have the css, html, and php set up. My issue is whenever I hit the submit button, all it does is reload the page and sends no data. I have honestly checked out the other forums here for answers but the things I have found in other forums, I have tried, but it hasn't worked. I will leave my code below, if anyone could tell me why its not submitting the values that would be a huge help. <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Contact Us"> <meta name="keywords" content="Contact Us"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"> <meta http-equiv="X-UA-Compatible" content=...

Reset/Submit button won't work once text area is edited by user?

Reset/Submit button won't work once text area is edited by user? My form's reset and submit buttons do not work when I edit the output of the form in the textarea. I created a form that outputs custom sentences based on user inputs. If I don't edit the textarea these buttons work fine, resetting or resubmitting onclick. However, if I edit the textarea all functionality seizes. Any ideas? Thanks! <3 <!DOCTYPE html> <html> <head> <title>Experiment</title> <style type="text/css"> table,td,th{ margin-left: auto;margin-right: auto } .display{ display: flex;align-items: center;justify-content: center; } p{ text-align: center; } textarea{ display: block;margin-left:auto;margin-right: auto; } </style> function sentence(){ document.getElementById("s1").style.display= 'block'; document.getElementById("r1").style.display= 'blo...

LoginForm hides or closes automatically when the ShowInTaskBar property is false

LoginForm hides or closes automatically when the ShowInTaskBar property is false I am developing an application in C# Winforms with system login where I have two forms, one being the main MainForm and the other which is for the login LoginForm . MainForm LoginForm This application has a Modern Flat UI Design interface, so it wants the LoginForm form is displayed in front of the MainForm form, to not display its icon in the taskbar and not allow the user to interact with MainForm to display it's been use of the method ShowDialog(); . Modern Flat UI Design LoginForm form MainForm MainForm ShowDialog(); LoginForm compacted code: LoginForm public partial class LoginForm : Form { protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.ShowInTaskbar = this.ShowIcon = false; } } MainForm compacted code: MainForm public partial class MainForm : Form { protected override void OnLoad(EventArgs e) { base.OnLoad(e); new Logi...

How to show a form field (input type=“text”) when i click on a item

Image
How to show a form field (input type=“text”) when i click on a <select> item How to show the form field (input type) in the when I clicked "7th" from the select menu. Show us some code before we can help you – ssten Jun 29 at 9:36 Add onchange event handler, check current selected value - show/hide textfield. – u_mulder Jun 29 at 9:36 onchange I do this before but it can't work for me... – Syed Waqas Ahmad Jun 29 at 9:39 @SyedWaqasAhmad We need to see your code, we cant help you without ...

How to show a form field (input type=“text”) when i click on a item

Image
How to show a form field (input type=“text”) when i click on a <select> item How to show the form field (input type) in the when I clicked "7th" from the select menu. Show us some code before we can help you – ssten Jun 29 at 9:36 Add onchange event handler, check current selected value - show/hide textfield. – u_mulder Jun 29 at 9:36 onchange I do this before but it can't work for me... – Syed Waqas Ahmad Jun 29 at 9:39 @SyedWaqasAhmad We need to see your code, we cant help you without ...

Drupal, hook_form_alter add field in node edit / create

Drupal, hook_form_alter add field in node edit / create I have a node and I need to populate a field programmatically, so here is what I do : $campaigns = $client->get_campaigns(); $tab_campaign = array(""=>"Dernière newsletter"); foreach ($campaigns->response as $camp){ $tab_campaign[$camp->CampaignID] = $camp->Name; } $form['field_last_newsletter'] = array( '#type' => 'select', '#required' => true, '#options' => $tab_campaign, '#title' => 'Choisir la dernière newsletter', ); } This work, I have my select field populated but when I select one and click on save nothing is saved, if I come back to the edit page the select have the default value, what I am doing wrong ? Thanks. 2 Answers 2 I think you're looking for a allowed_values_function s...