forms – Validation for if all fields are required when an optional field has a value

I have a form that has an optional username/password input but when either the username or password has a value it causes them both to be required. Not sure how I should approach this?
So far the validation looks a little wordy:
enter image description here

I considered this kind of validation, but it gives an either/or impression:

enter image description here

gui design – Is filling the center-area of a GUI with several forms a good practice?

Center-area concept:

For a desktop application, we commonly find a similar structure for the GUI:

  • Top menu / Ribbon
  • Dockables left and right to explore the content and show properties.
  • Center-area with the main content or view. Internal frames are deprecated in favour of file tabs.

I am not sure about the name of this “center-area”, my apologies if there is a more appropriate name. For the purpose of this question, I will keep calling it “center-area”

As an example (E is the center-area):

enter image description here


Multiple center-areas concept:

Let now suppose a use-case where several views of the same “file” or “project” are useful with an equivalent importance: to illustrate this principle, I will take the example of a “3D printer” slicer.

  • The 3D view is required to be big, so details and possible issues are well visible. (It makes sense to have it in the center-area).
  • The user spend 90% of it time on settings and configurations, which would ideally be in the center-area. Note that applying those settings (slicing) take time (usually many seconds), so there is no point in showing the 3D view and settings at the same time.

An other example is a 3D engine editor:

  • The designer spend lot of time editing the 3D view, by placing new models in it (it makes sense to have it in the center-area).
  • The designer spend lot of time configuring shaders managing huge graphs. (it makes sense to have the graph view in the center-area).

Shader editor in Unreal engine
3D view editor in Unreal engine

Note: I want to highlight the difference between having multiple content in the same center-area GUI (e.g. multi-files in your browser), versus having multiple GUIs filling the center-area, for the same project or file.

The question (s):

Is having two(or more) GUI filling the center-area a good practice?
Otherwise, what are the alternatives?
Finally, is there a name for this multi-central-area GUI?

Se pueden tener dos formularios que funcionen de manera independiete en una misma web forms de ASP.NET y C#

resulta que en una misma web forms de ASP cree dos formularios diferentes, ambos con controles diferentes, uno es para un registro de voluntarios y el otro para registro de veterinarios voluntarios y funcionan correctamente.

El problema es cuando le agrego la propiedad required para evitar los valores nulos, no permite enviar la informacion de manera independiente, la unica forma de registrar la informacion es llenar los dos formularios

¿es posible hacer que los dos forularios se comporten de manera independiente?

forms – Set an optional field to a fixed value

I’ve got a edit form in which the user can change a number of properties from an item. In certain conditions, there is an optional time field which the user can set. But it cannot be set to an actual value in the UI, the user can only specify that it must be set to ‘Now’ (a backend then later in the process will determine what ‘Now’ actually is with margins and so).

I am looking for a good design for this. Of course I can use a checkbox with “Use current time” or something, but that looks weird in this case.

What I’ve come up with is this:
(real form and design is very different and specific, mockup just to show the idea):
Mockup with now button
The optional field here is ‘Due time’. When it’s present and has no value, the ‘Due time’ header is shown with a grey ‘Unknown’ value below. A ‘Now’ button can be pressed and that changes the value to ‘Now’ after which the button disappears. User can Update the rest of the item or Cancel it by using the form buttons. We’ve got a Now/Clock icon and button in some other places in our app, so that might be familiar to the user.

What do you guys think? Is this a weird interaction? If don’t think I see this much so I am doubting.

forms – How can I make a changeable textfield to save updated data?

hello here is a question.
I want to make simple example in drupal 8
when i lunch a page appears a textfield with value from database field1
than after changeing it and submitting it will update value in database

  public function buildForm(array $form, FormStateInterface $form_state) {
    $node = Drupal::routeMatch()->getParameter('node');
    $id = Drupal::request()->query->get('id');
    $user = DrupaluserEntityUser::load(Drupal::currentUser()->id());
    $select = Database::getConnection()->query("SELECT * FROM guaranteelist WHERE id ='".$id."'")->fetch();

    $form('phone') = array(
      '#title' => t('Phone number'),
      '#type' => 'textfield',
    //  '#value' => $select -> phone,
      '#ajax' => array(
          'callback' => array($this, 'valuechange'),
          'event' => 'change',
          'wrapper' => 'edit-output',
        ),
      '#size' => 25,
      '#description' => t("type your phone number"),
      '#required' => TRUE,
    );

    $form('submit') = array(
      '#type' => 'submit',
      '#value' => t('send'),

    
    return $form;
  }


 public function valuechange(array &$form, FormStateInterface $form_state) {
      $response = new AjaxResponse();
  $response->addCommand(new AlertCommand('jdsa;'.$this->input.' as'));
  return $response;
    }

 public function submitForm(array &$form, FormStateInterface $form_state) {
    $user = DrupaluserEntityUser::load(Drupal::currentUser()->id());
    $id = Drupal::request()->query->get('id');
    $phone = $form_state->getValue('phone');
    $update = Database::getConnection()->query("UPDATE guaranteelist SET phone = '".$phone."'   WHERE id ='".$id."'");
   drupal_set_message(t('Ok')); 
}
}

in such case when we input new value into textfield value of textfield will not change.
so how can I do it?

I want a data from database see on a textfield than make some changes and by submitting update database.
in my case no matter what we input into textfield value will not change.

multilinear algebra – Are alternating and anticommutative forms equivalent?

A form is defined to be alternating iff having two equal arguments means it is equal to 0. It is defined to be anticommutative iff permuting its arguments means multiplying by the sign of the permutation.

Unless my definitions are wrong, I’m pretty sure the two are equivalent, right? Also, if it is the case, why do we use two different names for the same concept?

8 – Multiple forms on one page

I try to input several forms into one page via Controller. With code which is
under, I see those forms but after submit one of them, nothing happens. Any of data is send to database. Has anyone idea how to fix this?

<?php

namespace DrupalCoreEntityContentEntityForm;
namespace DrupalstudentController;
use DrupalnodeEntityNode;
use DrupalCoreFormFormStateInterface;
use DrupalCoreControllerControllerBase;
use DrupalnodeNodeInterface;
use DrupalnodeEntity;
use DrupalnodeNodeForm;
use DrupalCoreFormFormBase;
use DrupalCoreUrl;
use DrupalCoreLink;
use DrupalCoreRouting;
use DrupalCoreEntityContentEntityForm;

class SFormController extends ControllerBase {

  function new_form() { 
    
    $build = ();
  
    foreach ($stud as $id => $name) {
      
      $node = DrupalnodeEntityNode::create(('type' => 'student'));
      $form = Drupal::service('entity.form_builder')->getForm($node, 'student_form');
      
      $build() = $form;
    }   
    return $build;
  }
}

?>

PowerApp Form’s Edit mode when double-clicking on the list item – get rid off the Edit All button

I found this tip about how to open a PowerApp Form directly in Edit Mode (How to go directly to Edit mode in PowerApps Form attached to SharePoint List?).
I tried it and it works, but only partially because I cannot get rid of “Edit all” which still appears in the ribbon of the form (and not Save, Cancel…etc, as expected). One must still click on “Edit All” to be able to save the modifications.
Thanks,
Alina

list – How do you display text on different lines within a Sharepoint forms header using JSON?

I am attempting to recreate a word document type form on Sharepoint.

I have been successful in creating a list and formatting the body of the form to a level where questions are in the appropriate section.

The issue that I am encountering is formatting some text in the header. I cannot seem to find any information on how to structure the JSON so that written information for the form can be within the header. I can display the written information in the header but it displays in horizontal divisions.

I would like to display the written information so that it appears under each sentence like it would in the original word document.

Here is the JSON that I am currently trying to manipulate

{
"debugMode": true,
"elmType": "div",
"attributes": {
    "class": "ms-borderColor-neutralTertiary"
},
"style": {
    "width": "100%",
    "border-top-width": "0px",
    "border-bottom-width": "1px",
    "border-left-width": "0px",
    "border-right-width": "0px",
    "border-style": "solid",
    "margin-bottom": "16px",
    "column-count": "1"
},
"children": (
    {
        "elmType": "div",
        "style": {
            "display": "flex",
            "box-sizing": "border-box",
            "align-items": "center"
        },
        "children": (
            {
                "elmType": "div",
                "attributes": {
                    "class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-themePrimary",
                    "title": "Details"
                },
                "style": {
                    "width": "100%",
                    "flex": "none",
                    "padding": "0px",
                    "padding-left": "0px",
                    "height": "0px",
                    "column-count": "1"
                }
            }
        )
    },
    {
        "elmType": "div",
        "attributes": {
            "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"
        },
        "style": {
            "box-sizing": "border-box",
            "width": "100%",
            "text-align": "left",
            "padding": "21px 12px",
            "overflow": "hidden",
            "column-count": "1"
        },
        "children": (
            {
                "elmType": "div",
                "txtContent": "Request Form"
            }
        )
    },
    {
        "elmType": "div",
        "attributes": {
            "class": "ms-fontColor-red Secondary ms-fontWeight-bold ms-fontSize-12"
        },
        "style": {
            "box-sizing": "border-box",
            "width": "100%",
            "text-align": "left",
            "padding": "21px 12px",
            "overflow": "hidden"
        },
        "children": (
            {
                "elmType": "div",
                "txtContent": "Please ensure that agreement has been obtained from the ‘Business Sponsor’ before submitting this request "
            }
        )
    },
    {
        "elmType": "div",
        "attributes": {
            "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-12"
        },
        "style": {
            "box-sizing": "border-box",
            "width": "100%",
            "text-align": "left",
            "padding": "21px 12px",
            "overflow": "hidden"
        },
        "children": (
            {
                "elmType": "div",
                "txtContent": "Please provide adequate information below to enable pre-investigation to be undertaken."
            }
        )
    },
    {
        "elmType": "div",
        "attributes": {
            "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-12"
        },
        "style": {
            "box-sizing": "border-box",
            "width": "100%",
            "text-align": "left",
            "padding": "21px 12px",
            "overflow": "hidden"
        },
        "children": (
            {
                "elmType": "div",
                "txtContent": "The Team will allocate a Project ID No.  which shall be used to track the progress of this request. "
            }
        )
    },
    {
        "elmType": "div",
        "attributes": {
            "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-12"
        },
        "style": {
            "box-sizing": "border-box",
            "width": "100%",
            "text-align": "left",
            "padding": "21px 12px",
            "overflow": "hidden"
        },
        "children": (
            {
                "elmType": "div",
                "txtContent": "This form is only applicable for a request which is not covered by the Catalogue. "
            }
        )
    }
)

I have searched through many pages on the internet but I don’t think my search is optimal as I either end up on the Microsoft documents pages (which provides little information) or other pages regarding JSON Webhooks / API’s etc.

Word Document Example

If someone could please advise whether what I am trying to do is even possible and if so, what I am missing from my code?

Thanks in advance

Rob