Load respective custom field as input field when the select option is changed

I have 2 custom Posts Type

  1. Subject Clusters ( is a group of subjects)
  2. Subjects

So when a new cluster is saved, it saves a group of subjects.

Subjects (2nd custom post type) can be added via a multi-select custom field (ACF Post object) on cluster Post type edit screen. Here is the link to an image portraying it.

https://prnt.sc/odr8pj

Now in the frontend, I have created a select option for each cluster. Below that there will be a couple of subject Grade input field according to the cluster object selected.

For example, Math related cluster should populate a 4 subject input fields like the image below.

https://prnt.sc/odrdpu

Once the cluster option changes it would change fields accordingly.

Here is my code to get cluster as an option.

<?php      global $  post;     $  args = array(               'numberposts' => -1,               'post_type'   => 'cluster'             );      $  clusterlist = get_posts( $  args ); ?>      <select class="custom-select" id="inputGroupSelect01">       <option selected>Select Clusters ...</option>       <?php foreach($  clusterlist as $  post) : setup_postdata($  post);?>       <option value="<?php echo $  post->post_name; ?>"><?php the_title(); ?>        </option>      <?php  endforeach; ?>     </select> 

Now how would I get the multiple subjects selected on the cluster post type edit screen as an input field on the homepage?? field name = “subjects”

Html for input field of Math related Cluster

<div class="form-row pb-5" id="math-related"">   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num1" placeholder="Math">   </div>   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num2" placeholder="Science">   </div>   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num3" placeholder="Computer">   </div>   <div class="form-group col-md-3">     <input type="number" class="form-control" id="num4" placeholder="Physics">   </div> </div> 

After that how to change the input fields once the option is changed?

Resending an encrypted message so that it’s guaranteed from being changed and is visible only to receivers

I faced the next rather theoretical problem. Sender sends a message (I, Ch, S), where I is the proper content of the message, Ch is chain of receivers/resenders and S is just a sum. By having received the message Receiver sees all the information in it (I, Ch and S), next he/she can either accept or decline the message. By accepting it he is in right to resend the message as many times as he wants, adding every time its’ name to Ch, but S of all the sent messages is equal to the S of the original message.

Ex, Alice sends <“1st message”, Alice, 500> to Bob, Bob sends <“1st message, (Alice, Bob), 500> to Daenerys. And Daenerys sends <“1st message, (Alice, Bob, Daenerys), 300> to Jon and <“1st message, (Alice, Bob, Daenerys), 200> to Tyrion.

The problems here as I see are next: 1/ The message must be encrypted , firstly, with Bob’s public key, then decrypted with his private key, then encrypted by Daenerys’ public key. But Dany can’t be sure that the content isn’t changed. Jon and Tyrion can’t be sure that the sum of the received messages is equal to the sum of the original message.

NFS – file system UUID and label changed during crash

I was streaming a movie over NFS and it cut out about 1 hr in. The drive was in a 4 x 4 tb box. The drive with the movie (drive 2) on it now won’t mount at boot. I took a look at the label and the UUID of drive 2. These were changed to match those of drive 1 after the crash. Running repair filesystem in ubuntu disks didn’t fix the issue.

NFS – file system UUID and label changed during crash

I was streaming a movie over NFS and it cut out about 1 hr in. The drive was in a 4 x 4 tb box. The drive with the movie (drive 2) on it now won’t mount at boot. I took a look at the label and the UUID of drive 2. These were changed to match those of drive 1 after the crash. Running repair filesystem in ubuntu disks didn’t fix the issue.

NFS – file system UUID and label changed during crash

I was streaming a movie over NFS and it cut out about 1 hr in. The drive was in a 4 x 4 tb box. The drive with the movie (drive 2) on it now won’t mount at boot. I took a look at the label and the UUID of drive 2. These were changed to match those of drive 1 after the crash. Running repair filesystem in ubuntu disks didn’t fix the issue.

Should you allow users to “save” options that haven’t changed?

I have a situation where a user opens some options that appear in a popup. They can make their changes and then either Save or Cancel, both of which close the box and save/discard the user’s changes.

There seem to be different approaches regarding whether the Save button should be enabled if the options haven’t changed from their initial state (Or have returned to their original state)

Either:

  • Save is always available
  • Save is only enabled when changes have been made

It seems “Smarter” to only allow saving when changes will actually be saved, and the a disabled save button may potentially reassure some users. However, I generally don’t like the user being prevented from saving valid data, even if that data hasn’t changed.

Is there a best practice way to do this? Or is it simply a matter of using whichever feels most applicable to each situation?