## calendar – I’m needing to figure out how to create a page that user could create a “task” and it be selectable on a form

Essentially what I am looking to do is to have a page designed that is only accessible through a client login, but the one page would have the ability to create a “calendar task” if you will. So they would be able to name it, put the text body and assign a start date and end date, and of course save it.

Then after it’s saved they can go to the schedule tab which would have a day of each week and the available time slots, basically like a form, and each time slot would have a drop down that they would then be able to select which task they previously created and saved goes into that time slot.

For example:

Monday, 6am has 5 options, 6:05, 6:20, 6:35, and 6:35. Each of those times would have a drop down available and the user has the option of selecting General, or from a list of one of the task that was created.

Then the same for the 7am, hour, and so on for all 24 hours.

I don’t know if this can be accomplished in some form of calendar plugin, or a form, or what. I’m looking for suggestions.

## interaction design – Should I prevent a user from navigating away from a form while it is being processed?

I’m designing a CRM which has a lot of forms in order to edit everything.
Currently, when you save a form, the Save button transforms into a loading-gif and is disabled (more clicks won’t do anything) and if successful back to the save button with a success message.
It should be mentioned that the user edits detail-information inside the form. So the same form can be edited multiple times consecutively.

Normally, the user doesn’t has to wait more than 1 second until the form is processed and saved. But what if it takes longer?
Currently the user is able to navigate away before the form is saved, if the processing takes a long time. The saving-process is asynchronous, so it still will be saved. But if an error occurs, and the user is on a whole different page, the error message won’t be displayed.

So should I stop the user from navigating away while the form is still processed?
If yes, how? Overlay over the navigation? Over the whole screen? Info-Message that if navigating away, he won’t be notified if there is an error?
If I shouldn’t stop the user, how should I inform him, if the save-process was successfull or failed?

## nt.number theory – Primes of the form \$2^k + p^e\$ in more than one way where p is an odd prime (\$e > 1, k > 1\$)

My question is related to https://oeis.org/A282533. Known terms are as below.

$$41 = 2^4 + 5^2 = 2^5 + 3^2.$$
$$89 = 2^3 + 3^4 = 2^6 + 5^2.$$
$$113 = 2^5 + 3^4 = 2^6 + 7^2.$$
$$137 = 2^7 + 3^2 = 2^4 + 11^2.$$
$$593 = 2^9 + 3^4 = 2^6 + 23^2.$$
$$857 = 2^7 + 3^6 = 2^4 + 29^2.$$
$$2213 = 2^4 + 13^3 = 2^2 + 47^2.$$

Is there any reference about primes that are the sum of two proper prime powers in more than one way ? Any helpful comment about this sequence would be very welcome.

## dnd 5e – Can a Circle of the Stars druid fire an arrow from its star form and cast a spell of 1st level or higher during the same turn?

### You can cast a spell on the same turn as using the starry form attack

As you’ve mentioned, the starry form attack only states that you must “make a ranged spell attack”, but nowhere does it say that it is a spell. Regardless, it also doesn’t state that it uses a spell slot, which is the real restriction on whether or not you could cast another spell (as Thomas Markov’s answer shows).

Given that neither of those things are true (it isn’t a spell, and even if it was, it doesn’t use a spell slot), then you are free to cast another spell with your remaining action.

(In this case, the fact that it says “make a ranged spell attack” is just a short hand way of telling you to make an attack that uses your Wisdom modifier and your proficiency bonus.)

## Magento 2 add Estimate Shipping Form on Product Page

Following this post

Magento 2 : How to display Shipping Rates on a Product Page

i can get shipping rates for current product, tested with curl:

``````curl -ik -X POST -H "Content-Type: application/json" -d "{""address"":{""country_id"": ""IT""}}" https://example.com/rest/V1/shipping/estimate/51003PRI
``````

got the following response:

``````[{"carrier_code":"tablerate","method_code":"bestway","carrier_title":"Shipping Method","method_title":"Express Delivery","amount":0,"base_amount":0,"available":true,"error_message":"","price_excl_tax":0,"price_incl_tax":0}]
``````

Now i need to display a form in product page like the “Estimate Shipping and Tax” in cart page to pass the address in post action.

I would like to do it using ui form and ajax and need to update region field depending country field.

Any suggestions?

## interaction design – Should I prevent a user from navigating away from a form while it is being proccessed?

I’m designing a CRM which has a lot of forms in order to edit everything.
Currently, when you save a form, the Save button transforms into a loading-gif and is disabled (more clicks won’t do anything) and if successful back to the save button with a success message.
It should be mentioned that the user edits detail-information inside the form. So the same form can be edited multiple times consecutively.

Normally, the user doesn’t has to wait more than 1 second until the form is proccessed and saved. But what if it takes longer?
Currently the user is able to navigate away before the form is saved, if the proccessing takes a long time. The saving-process is asynchronous, so it still will be saved. But if an error occurs, and the user is on a whole different page, the error message won’t be displayed.

So should I stop the user from navigating away while the form is still proccessed?
If yes, how? Overlay over the navigation? Over the whole screen? Info-Message that if navigating away, he won’t be notified if there is an error?
If I shouldn’t stop the user, how should I inform him, if the save-proccess was successfull or failed?

## 8 – Is there a way to pass custom data to a form template?

I have been tasked to customize a view, and I have been struggling with its exposed form, because I need to display some informations. Here is how it should look:

These elements act as a checkbox, but the number on the right is the number of nodes that have this tag linked.

So far, I have nothing code related, because I simply don’t know how to handle this. The theme itself would accept an array of array, each of them containing the checkbox’s text, its value, and this number, like so:

``````tabs: [
{
label: "Topics",
filtersType: "tag",
filterName: "loremField[]",
filters: [
{
id: "lorem1",
label: "Loremi",
items: "5"
},
{
id: "lorem2",
label: "Loremi",
items: "15"
}
}
]
``````

However, I’m not able to either pass this “items” key to either the form, and I’m not sure at all that I can customize the input from the hook form alter. For a reference, here is the template:

``````<div class="c-tag-filters">
{% for item in filters %}
<div class="c-tag-filters__item">
<input id="{{item.id}}" name="{{ filters.filterName }}" class="c-tag-filters__item__input" type="checkbox">
<div class="c-tag-filters__item__content">
<label for="{{item.id}}">{{item.label}} <span class="c-tag-filters__item__content--nb">{{ item.items }}</span></label>
</div>
</div>
{% endfor %}
</div>
``````

So, how should I proceed in this case?

## 8 – Displaying another entity’s form on a node

I am trying to embed the edit form for a flag on my node (the full page view mode).

After some struggle, I finally figured out how to get the flagging form. But once I have the form, how do I actually get it to display on the page?

``````function MYMODULE_node_view(array &\$build, NodeInterface \$node, EntityViewDisplayInterface \$display, \$view_mode) {
if (\$node->getType() == 'MY_CONTENT_TYPE') {
\$flag = Drupal::service('flag')->getFlagById('MY_FLAG_ID');
\$flagging_entity = Drupal::service('flag')->getFlagging(\$flag, \$node);
\$form = Drupal::service('entity.manager')
->getFormObject('flagging', 'edit')
->setEntity(\$flagging_entity);
\$form_obtained = Drupal::formBuilder()->getForm(\$form);
// How do I actually show the form on the node?
``````

I looked at this question on rendering forms (which says use the `formBuilder` service, which I am already using). I assume I need to put the form in a render array but the documentation is not clear about how to do that.

I have a SharePoint list form and I prepopulated certain fields with sharepont user properites. I also decided to use DOM development for form manipulation on the list form. Using the DOM, I was able to successfully disable certain form elements. I also have a checkbox at the beginning of the form that is supposed to hide certain fields when checked. For some reason, my eventlistener on the checkbox isn’t working like it should.

In the developer tool when looking at the SharePoint list form, I get the following error: ‘Unable to get property ‘addEventListener’ of undefined or null reference
The error points to this line:
`document.querySelector('input(title="anonymous")').addEventListener('click',getProperties);`

``````(function(){
getProperties();
})();

function getProperties(){
var web = _spPageContextInfo.webAbsoluteUrl;
var endPointUrl = web + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties";

axios.get(endPointUrl).then(function(response) {
var properties = response.data.UserProfileProperties;
var displayName = response.data.DisplayName;
var nameAry = displayName.split(" ");
if (document.querySelector('input(title="Anonymous")') == false) {
}

var fName = document.querySelector('input(title="First Name")');
fName.value = nameAry(1);
fName.disabled = true;

var lName = document.querySelector('input(title="Last Name")')
lName.value = nameAry(0);
lName.disabled = true;

eMail.value = response.data.Email;
eMail.disabled = true;
for (var i = 0; i < properties.length; i++) {
//Office Phone Number
if (properties(i).Key == "Office") {
var oSymbold = document.querySelector('input(title="Office Symbol")')
oSymbold.value = properties(i).Value;
oSymbold.disabled = true;
}
}
});
}
``````

Here’s the weird part, I’m able to run the same exact code(slight modifications) in codepen but reading from typicode/json instead of a SharePoint list and it works perfectly. Here’s the codepen

Any idea why it’s not working in SharePoint?

Any assistance you can provide would be much appreciated. I’ve been tackling this for two days.

## How do I create a simple form that can edit the text links on an html page?

I’m trying to create a simple personal offline home page with text links that can be edited without the user having to go into the html code.

I have the home page with some blank links done but need some way to edit the links from a form for people who don’t understand html.

Maybe there is a simple code I could add to each link entry where you can right click it and a mini pop up editor opens like when you right click on a link in your firefox toolbar, click on “properties” and you can edit the link?

Thanks for any help!